mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-01 13:02:43 +00:00
Fix empty Google Brews crashing user page
This commit is contained in:
@@ -151,7 +151,8 @@ app.get('/user/:username', async (req, res, next)=>{
|
|||||||
console.error(err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
|
|
||||||
brews = _.concat(brews, googleBrews);
|
if(googleBrews)
|
||||||
|
brews = _.concat(brews, googleBrews);
|
||||||
}
|
}
|
||||||
|
|
||||||
req.brews = _.map(brews, (brew)=>{
|
req.brews = _.map(brews, (brew)=>{
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ GoogleActions = {
|
|||||||
})
|
})
|
||||||
.catch((err)=>{
|
.catch((err)=>{
|
||||||
return console.error(`Error Listing Google Brews: ${err}`);
|
return console.error(`Error Listing Google Brews: ${err}`);
|
||||||
|
//TODO: Should break out here, but continues on for some reason.
|
||||||
});
|
});
|
||||||
|
|
||||||
if(!obj.data.files.length) {
|
if(!obj.data.files.length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user