From: Benjamin Auder Date: Sun, 9 Feb 2020 20:16:36 +0000 (+0100) Subject: Try to fix 504 timeout error X-Git-Url: https://git.auder.net/variants/current/doc/scripts/pieces/%3C?a=commitdiff_plain;h=99f12ac0a1dc9633db08bf2804d7920d060fc214;p=vchess.git Try to fix 504 timeout error --- diff --git a/server/models/Game.js b/server/models/Game.js index 79bf071f..32b2a662 100644 --- a/server/models/Game.js +++ b/server/models/Game.js @@ -138,7 +138,8 @@ const GameModel = db.all(query, (err,gameIds) => { if (!!err) return cb(err); - gameIds = gameIds || []; //might be empty + if (gameIds.length == 0) + return cb(null, []); let gameArray = []; for (let i=0; i