X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FMyGames.vue;h=a9e69f653ad93814d30f25240e89fc15ce59cabe;hb=68e19a449db7a12e0a168e99cd750d985c983ba1;hp=1f1da59e26875abbd12ba4bedc8b7a0e35a9c161;hpb=f14572c4a22425033735253eabbaa2d8dbb53d05;p=vchess.git diff --git a/client/src/views/MyGames.vue b/client/src/views/MyGames.vue index 1f1da59e..a9e69f65 100644 --- a/client/src/views/MyGames.vue +++ b/client/src/views/MyGames.vue @@ -120,8 +120,8 @@ export default { credentials: true, data: { cursor: this.cursor }, success: (res2) => { - if (res2.games.length > 0) { - const L = res2.games.length; + const L = res2.games.length; + if (L > 0) { this.cursor = res2.games[L - 1].created; let completedGames = res2.games; completedGames.forEach(g => g.type = "corr"); @@ -295,8 +295,8 @@ export default { credentials: true, data: { cursor: this.cursor }, success: (res) => { - if (res.games.length > 0) { - const L = res.games.length; + const L = res.games.length; + if (L > 0) { this.cursor = res.games[L - 1].created; let moreGames = res.games; moreGames.forEach(g => g.type = "corr");