From 27782b2f8394698384aea68bf10a29227bbb8478 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Mon, 11 Dec 2023 20:44:29 +0200 Subject: [PATCH] Fix united version comparison --- public/scripts/kai-settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/kai-settings.js b/public/scripts/kai-settings.js index 32f4ea598..7bdfc5f26 100644 --- a/public/scripts/kai-settings.js +++ b/public/scripts/kai-settings.js @@ -334,7 +334,7 @@ export function setKoboldFlags(koboldUnitedVersion, koboldCppVersion) { * @returns {boolean} True if srcVersion >= minVersion, false if not */ function versionCompare(srcVersion, minVersion) { - return srcVersion.localeCompare(minVersion, undefined, { numeric: true, sensitivity: 'base' }) > -1; + return (srcVersion || '0.0.0').localeCompare(minVersion, undefined, { numeric: true, sensitivity: 'base' }) > -1; } /**