X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=server%2Fmodels%2FGame.js;h=5f332b758db5cd185c2d8407a9f5654a8ac5625f;hp=641c0dcee365ca7d1d38f566cc505f2159d809ec;hb=8be8238cbd8bd1eeeb4c101648d6902cae425f7b;hpb=c583ef1c1dfd19aee88b22c2175202fbdf4dc1c0 diff --git a/server/models/Game.js b/server/models/Game.js index 641c0dce..5f332b75 100644 --- a/server/models/Game.js +++ b/server/models/Game.js @@ -300,10 +300,7 @@ const GameModel = // Check all that is possible (required) in obj: return ( ( - !obj.move || ( - !!(obj.move.played.toString().match(/^[0-9]+$/)) && - !!(obj.move.idx.toString().match(/^[0-9]+$/)) - ) + !obj.move || !!(obj.move.idx.toString().match(/^[0-9]+$/)) ) && ( !obj.drawOffer || !!(obj.drawOffer.match(/^[wbtn]$/)) ) && (