Correct logic

This commit is contained in:
Nathaniel Bond
2024-12-30 10:07:39 -05:00
parent c14aefa04c
commit f71eda27ac

View File

@@ -148,8 +148,8 @@ var GempLotrDeckBuildingUI = Class.extend({
newDeckBut.click(
function () {
if (that.deckContentsDirty && confirm("Do you wish to save this deck?"))
{
if (that.deckContentsDirty) {
if (confirm("Do you wish to save this deck?")) {
if (that.deckName == null) {
var newDeckName = prompt("Enter the name of the deck", "");
if (newDeckName != null) {
@@ -169,6 +169,7 @@ var GempLotrDeckBuildingUI = Class.extend({
$("#editingDeck").text("New deck");
that.clearDeck();
}
}
} else {
that.deckName = null;
$("#editingDeck").text("New deck");