Skip to content

Commit

Permalink
prevent error on userfile cataloging by only setting return url for m…
Browse files Browse the repository at this point in the history
…odels that actually apply
  • Loading branch information
Masterjun3 committed Nov 5, 2024
1 parent 7a5b654 commit 15eb744
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions TASVideos/wwwroot/js/catalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 15eb744

Please sign in to comment.