From 40c721121c9638c89ce40edc5e9fd9c113aa144e Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Tue, 11 Jun 2024 20:09:09 +0100 Subject: [PATCH] fix: workaround for attempted murder that'll teach me to assume a fucking thing about anything! --- common/src/lib/schemas.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/common/src/lib/schemas.ts b/common/src/lib/schemas.ts index c7f66023b..fce2d0adb 100644 --- a/common/src/lib/schemas.ts +++ b/common/src/lib/schemas.ts @@ -261,11 +261,16 @@ const PR_CHART_DOCUMENT = (game: Game) => (self: unknown) => { return "Array contained invalid versions"; } - const gameUsesVersions = versions.length > 0; - - if (gameUsesVersions && self.length === 0) { - return "Versions array should not be empty as this game uses versions"; - } + // yeah, so versions array *shouldn't* be empty, and yet we've ended up + // in a real, unignorable situation in which a chart has no versions. + // + // just allow this, for now. + + // const gameUsesVersions = versions.length > 0; + // + // if (gameUsesVersions && self.length === 0) { + // return "Versions array should not be empty as this game uses versions"; + // } if (new Set(self).size !== self.length) { return "Versions array shouldn't contain the same version twice";