0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 12:02:48 +00:00

[NFC] Explicitly define variables before using them

Fixed two errors which were discovered by trying to run the code in "strict" mode,
which is automatically done by Jest testing framework.
This commit is contained in:
Alexey Sachkov
2022-01-22 00:18:13 +03:00
parent 0573084ffd
commit 9c57450330
2 changed files with 3 additions and 2 deletions

View File

@@ -261,7 +261,8 @@ app.use((req, res)=>{
account : req.account,
enable_v3 : config.get('enable_v3')
};
templateFn('homebrew', title = req.brew ? req.brew.title : '', props)
const title = req.brew ? req.brew.title : '';
templateFn('homebrew', title, props)
.then((page)=>{ res.send(page); })
.catch((err)=>{
console.log(err);

View File

@@ -11,7 +11,7 @@ const config = require('nconf')
//let oAuth2Client;
GoogleActions = {
const GoogleActions = {
authCheck : (account, res)=>{
if(!account || !account.googleId){ // If not signed into Google