From b1fcfec14f9a7ea52fd9240994d712db7a63ed35 Mon Sep 17 00:00:00 2001 From: Michael Green <84688932+michael-j-green@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:14:12 +1100 Subject: [PATCH] Fix for generating launch links --- gaseous-server/wwwroot/scripts/main.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gaseous-server/wwwroot/scripts/main.js b/gaseous-server/wwwroot/scripts/main.js index 4c06b92..af854e4 100644 --- a/gaseous-server/wwwroot/scripts/main.js +++ b/gaseous-server/wwwroot/scripts/main.js @@ -757,10 +757,16 @@ async function BuildLaunchLink(engine, core, platformId, gameId, romId, isMediaG console.log('RomId is invalid!'); } - // check if isMediaGroup is a boolean in a number format - if (typeof (isMediaGroup) == 'boolean' && (Number(isMediaGroup) == 0 || Number(isMediaGroup) == 1)) { - isValid = false; - console.log('IsMediaGroup is invalid!'); + // check if isMediaGroup is a boolean in a number format - if not, verify it is a boolean + if (isMediaGroup == 0 || isMediaGroup == 1) { + // value is a number, and is valid + } else { + if (isMediaGroup == true || isMediaGroup == false) { + // value is a boolean, and is valid + } else { + isValid = false; + console.log('IsMediaGroup is invalid!'); + } } // check if filename is a string