0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

allow for null error instead of undefined

This commit is contained in:
Víctor Losada Hernández
2024-10-26 19:45:55 +02:00
parent ef1e0f1faa
commit a017c28b02

View File

@@ -22,7 +22,7 @@ const UserPage = (props)=>{
...props
};
const [currentError, setCurrentError] = useState(error);
const [currentError, setCurrentError] = useState(error || null);
const usernameWithS = username + (username.endsWith('s') ? `` : `s`);
const groupedBrews = _.groupBy(brews, (brew)=>brew.published ? 'published' : 'private');