From 0e4cfccee0d423c6bd69bf262f3f252aaea544ee Mon Sep 17 00:00:00 2001 From: Michael Green <84688932+michael-j-green@users.noreply.github.com> Date: Mon, 14 Aug 2023 22:05:47 +1000 Subject: [PATCH] fix: added check for selected items (#58) --- gaseous-server/wwwroot/pages/game.html | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/gaseous-server/wwwroot/pages/game.html b/gaseous-server/wwwroot/pages/game.html index e641bdf..025363b 100644 --- a/gaseous-server/wwwroot/pages/game.html +++ b/gaseous-server/wwwroot/pages/game.html @@ -571,18 +571,20 @@ } } - showProgress(); + if (remapCallCounterMax > 0) { + showProgress(); - for (var i = 0; i < rom_checks.length; i++) { - if (rom_checks[i].checked == true) { - var romId = rom_checks[i].getAttribute('data-romid'); - remapCallCounter += 1; + for (var i = 0; i < rom_checks.length; i++) { + if (rom_checks[i].checked == true) { + var romId = rom_checks[i].getAttribute('data-romid'); + remapCallCounter += 1; - ajaxCall('/api/v1/Games/' + gameId + '/roms/' + romId + '?NewPlatformId=' + fixplatform[0].id + '&NewGameId=' + fixgame[0].id, 'PATCH', function (result) { - remapTitlesCallback(); - }, function (result) { - remapTitlesCallback(); - }); + ajaxCall('/api/v1/Games/' + gameId + '/roms/' + romId + '?NewPlatformId=' + fixplatform[0].id + '&NewGameId=' + fixgame[0].id, 'PATCH', function (result) { + remapTitlesCallback(); + }, function (result) { + remapTitlesCallback(); + }); + } } } }