diff --git a/client/homebrew/pages/errorPage/errors/errorIndex.js b/client/homebrew/pages/errorPage/errors/errorIndex.js index 065512462..f4f3885dc 100644 --- a/client/homebrew/pages/errorPage/errors/errorIndex.js +++ b/client/homebrew/pages/errorPage/errors/errorIndex.js @@ -41,7 +41,7 @@ const errorIndex = (props)=>{ ## We can't find this brew in Google Drive! This file was saved on Google Drive, but this link doesn't work anymore. - ${props.brew.authors?.length > 0 + ${props?.brew?.authors?.length > 0 ? `Note that this brew belongs to the Homebrewery account **${props.brew.authors[0]}**, ${props.brew.account ? `which is diff --git a/client/homebrew/pages/vaultPage/vaultPage.jsx b/client/homebrew/pages/vaultPage/vaultPage.jsx index 682630b6f..aa1cb5679 100644 --- a/client/homebrew/pages/vaultPage/vaultPage.jsx +++ b/client/homebrew/pages/vaultPage/vaultPage.jsx @@ -74,8 +74,11 @@ const VaultPage = (props)=>{ updateStateWithBrews([], 1); }); - if(response.ok) + if(response?.ok) updateStateWithBrews(response.body.brews, page); + else { + console.log('response: ', response); + } }; const loadTotal = async (title, author, v3, legacy)=>{ @@ -364,13 +367,23 @@ const VaultPage = (props)=>{ } if(error) { - const errorText = ErrorIndex()[error.HBErrorCode.toString()] || ''; + if(error.HBErrorCode === undefined) { + return ( +