mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-22 10:06:58 +00:00
Switch to better brew.tags array check
This commit is contained in:
1 parent
995d1c63d8
commit
9e12ab71f8
1 file changed
+2
-2
@@ -219,8 +219,8 @@ const ListPage = createClass({
|
||||
// Filter by user selected tags
|
||||
let filterTagTest = true;
|
||||
if(this.state.filterTags.length > 0){
|
||||
filterTagTest = this.state.filterTags.every((tag)=>{
|
||||
if(typeof brew.tags == 'string') return false;
|
||||
filterTagTest = this.state.filterTags?.every((tag)=>{
|
||||
if(!Array.isArray(brew.tags)) return false;
|
||||
return brew.tags.findIndex((brewTag)=>{
|
||||
return brewTag.toLowerCase() == tag.toLowerCase();
|
||||
}) >= 0;
|
||||
|
||||
Reference in new issue
Block a user