X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FMyGames.vue;h=a9e69f653ad93814d30f25240e89fc15ce59cabe;hp=1f1da59e26875abbd12ba4bedc8b7a0e35a9c161;hb=68e19a449db7a12e0a168e99cd750d985c983ba1;hpb=11589e7c4bb1b69473588d133db8b6d1d37b8fee 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");