Skip to content

Commit 98a9cdc

Browse files
committed
Revert "clean up function"
This reverts commit 4073748.
1 parent 9797bf5 commit 98a9cdc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/Table/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ const Table = () => {
5656

5757
const filteredByCheckbox = () => {
5858
const checkbox = localStorage.getItem('checkbox') || '';
59-
if (!checkbox) return questions;
60-
return questions.filter(q => q.checkbox === checkbox);
59+
return questions.filter(question => {
60+
if (!checkbox) return true;
61+
return question.checkbox === checkbox;
62+
});
6163
};
6264

6365
for (let i = 0; i < questions.length; i += 1) {

0 commit comments

Comments
 (0)