No-Quest-ID-catch
This commit is contained in:
1 parent
292f517b89
commit
60d029433d
1 file changed
+5
@@ -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>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user