From: Benjamin Auder Date: Tue, 13 Apr 2021 14:34:18 +0000 (+0200) Subject: Add patch for compatibility with old version X-Git-Url: https://git.auder.net/variants/Checkered/vendor/current/pieces/cr.svg?a=commitdiff_plain;h=02c6ba4f6e6608ba120b121da516a195be3a1042;p=vchess.git Add patch for compatibility with old version --- diff --git a/client/src/components/ChallengeList.vue b/client/src/components/ChallengeList.vue index a1c46cdc..2432b272 100644 --- a/client/src/components/ChallengeList.vue +++ b/client/src/components/ChallengeList.vue @@ -49,6 +49,8 @@ export default { if (c.added < minAdded) minAdded = c.added; if (c.added > maxAdded) maxAdded = c.added; return Object.assign({ priority: priority }, c); + // TODO: remove patch soon + if (!c.options) c.options = {} }); const deltaAdded = maxAdded - minAdded; return augmentedChalls.sort((c1, c2) => { diff --git a/client/src/components/GameList.vue b/client/src/components/GameList.vue index 0d488e51..bc9e883a 100644 --- a/client/src/components/GameList.vue +++ b/client/src/components/GameList.vue @@ -83,6 +83,8 @@ export default { if (!!g.myColor) g.priority++; if (!!g.myTurn) g.priority++; } + // TODO: remove patch soon + if (!g.options) g.options = {} }); const deltaCreated = maxCreated - minCreated; return remGames.sort((g1, g2) => {