No-Quest-ID-catch

This commit is contained in:
SowinskiBraeden committed 2021-04-04 21:57:34 -07:00
1 parent 292f517b89
commit 60d029433d
1 file changed
+5
+5
View File
@@ -15,8 +15,10 @@
// Catch url Parameter // Catch url Parameter
window.onload = function () { window.onload = function () {
const queryString = window.location.search; const queryString = window.location.search;
if (queryString != null) {
const urlParams = new URLSearchParams(queryString); const urlParams = new URLSearchParams(queryString);
const id = urlParams.get('id'); const id = urlParams.get('id');
document.getElementById('div-container').innerHTML = "<h2>Uh oh, there was an issue getting the quest id! :(</h2>";
<% if(quests.length == 0) { %> <% if(quests.length == 0) { %>
document.getElementById('div-container').innerHTML = "<h2>Uh oh, theres no quests :(</h2>"; document.getElementById('div-container').innerHTML = "<h2>Uh oh, theres no quests :(</h2>";
<% } else if(quests.length > 0) { %> <% } else if(quests.length > 0) { %>
@@ -31,6 +33,9 @@
} }
<% }) %> <% }) %>
<% } %> <% } %>
} else {
document.getElementById('div-container').innerHTML = "<h2>Uh oh, there was an issue getting the quest id :(</h2>";
}
} }
</script> </script>