From 6d40afb060a6f9cdaa14d947bbee3afbb6e853cd Mon Sep 17 00:00:00 2001 From: Masterjun Date: Tue, 5 Nov 2024 23:33:56 +0100 Subject: [PATCH] prevent error on userfile cataloging by only setting return url for models that actually apply (#2028) --- TASVideos/wwwroot/js/catalog.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TASVideos/wwwroot/js/catalog.js b/TASVideos/wwwroot/js/catalog.js index 59b2a7cda..056ab8d1e 100644 --- a/TASVideos/wwwroot/js/catalog.js +++ b/TASVideos/wwwroot/js/catalog.js @@ -91,16 +91,16 @@ function enableCataloging() { function generateCurrentReturnUrl() { const returnUrlQueryModified = new URLSearchParams(); - if (systemModel.value) { + if (systemModel && systemModel.value) { returnUrlQueryModified.set('SystemId', systemModel.value); } - if (gameModel.value) { + if (gameModel && gameModel.value) { returnUrlQueryModified.set('GameId', gameModel.value); } - if (versionModel.value) { + if (versionModel && versionModel.value) { returnUrlQueryModified.set('GameVersionId', versionModel.value); } - if (gameGoalModel.value) { + if (gameGoalModel && gameGoalModel.value) { returnUrlQueryModified.set('GameGoalId', gameGoalModel.value); }