Fix GameModel.cleanDb()
authorBenjamin Auder <benjamin.auder@somewhere>
Fri, 3 Apr 2020 02:06:48 +0000 (04:06 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Fri, 3 Apr 2020 02:06:48 +0000 (04:06 +0200)
server/models/Game.js

index ed3fb43..516c4bc 100644 (file)
@@ -483,6 +483,7 @@ const GameModel =
               )
               ||
               (
+                !!movesGroups[g.id] &&
                 movesGroups[g.id].nbMoves == 1 &&
                 tsNow - movesGroups[g.id].lastMaj > 14*day
               )