Fix bug where strings would be appended on click despite trying to cancel it
This commit is contained in:
parent
35e3378db6
commit
9b932291d2
@ -1,7 +1,7 @@
|
||||
const addStringButton = document.getElementById("add-string-button");
|
||||
addStringButton.addEventListener("click", (e) => {
|
||||
const stringName = prompt("Enter a string name: ");
|
||||
if (stringName == "") {
|
||||
if (!stringName) {
|
||||
return;
|
||||
}
|
||||
for (let section of document.getElementsByClassName("translation-section")) {
|
||||
|
Loading…
Reference in New Issue
Block a user