0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-27 02:52:43 +00:00

Update client/homebrew/pages/userPage/userPage.jsx

Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
This commit is contained in:
G.Ambatte
2021-08-28 11:09:33 +12:00
committed by GitHub
parent 501b356344
commit 5f837f7b3c

View File

@@ -146,7 +146,7 @@ const UserPage = createClass({
getSortedBrews : function(){
const testString = _.deburr(this.state.filterString).toLowerCase();
const brewCollection = this.state.filterString ? _.filter(this.props.brews, (brew)=>{
return (_.deburr(brew?.title).toLowerCase().includes(testString)) ||
return (_.deburr(brew.title).toLowerCase().includes(testString)) ||
(_.deburr(brew?.description).toLowerCase().includes(testString));
}) : this.props.brews;
return _.groupBy(brewCollection, (brew)=>{