Correct logic
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user