mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-25 16:12:37 +00:00
Switch to better brew.tags array check
This commit is contained in:
@@ -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