diff --git a/server/homebrew.api.js b/server/homebrew.api.js index e5d304b69..393c9793d 100644 --- a/server/homebrew.api.js +++ b/server/homebrew.api.js @@ -43,7 +43,7 @@ const getBrew = (accessType, fetchGoogle = true)=>{ } }); stub = stub?.toObject(); - if(accessType === 'edit' && stub?.authors && !stub?.authors.includes(req.account.username)) { + if(accessType === 'edit' && stub?.authors?.length > 0 && !stub?.authors.includes(req.account?.username)) { throw 'Current logged in user does not have access to this brew.'; }