mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-23 05:47:02 +00:00
Simplify filter tag test
This commit is contained in:
1 parent
7e98f79416
commit
2c997458b2
1 file changed
+1
-2
@@ -219,8 +219,7 @@ const ListPage = createClass({
|
||||
// Filter by user selected tags
|
||||
let filterTagTest = true;
|
||||
if(this.state.filterTags.length > 0){
|
||||
filterTagTest = this.state.filterTags?.every((tag)=>{
|
||||
if(!Array.isArray(brew.tags)) return false;
|
||||
filterTagTest = Array.isArray(brew.tags) && this.state.filterTags?.every((tag)=>{
|
||||
return brew.tags.findIndex((brewTag)=>{
|
||||
return brewTag.toLowerCase() == tag.toLowerCase();
|
||||
}) >= 0;
|
||||
|
||||
Reference in new issue
Block a user