0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42: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 12:12:35 +12:00
committed by GitHub
parent 5f837f7b3c
commit 22fb84ca32

View File

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