Fix bug where mod is added even though cancel is pressed
This commit is contained in:
parent
5b75a2addb
commit
43e1581482
|
@ -112,6 +112,9 @@ function displayGui() {
|
|||
addBtn.innerHTML = "Add new";
|
||||
addBtn.addEventListener("click", () => {
|
||||
var newMod = window.prompt("URL of Mod: ", "http://example.com/example.js");
|
||||
if (!newMod) {
|
||||
return; //User pressed cancel
|
||||
}
|
||||
Mods.push(
|
||||
newMod
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue