projects
/
vchess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
677fe28
)
Try to fix 504 timeout error
author
Benjamin Auder
<benjamin.auder@somewhere>
Sun, 9 Feb 2020 20:16:36 +0000
(21:16 +0100)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Sun, 9 Feb 2020 20:16:36 +0000
(21:16 +0100)
server/models/Game.js
patch
|
blob
|
blame
|
history
diff --git
a/server/models/Game.js
b/server/models/Game.js
index
79bf071
..
32b2a66
100644
(file)
--- 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<gameIds.length; i++)
{