Skip to content

Commit 4073748

Browse files
committed
clean up function
1 parent 5b02819 commit 4073748

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/components/Table/index.js

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

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

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

0 commit comments

Comments
 (0)