Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

compare string value, not boolean

  • Loading branch information...
commit dc731ce35be402c8f35c462dcbfc681cbd9e09c3 1 parent 0faa79d
@crdx authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 game.js
View
6 game.js
@@ -42,8 +42,8 @@ function Puzzle(settings)
this.addEventHandlers();
- if (!this.settings.numbers && (settings.imageUrl === "" || typeof settings.imageUrl === "undefined"))
- settings.numbers = true;
+ if (this.settings.numbers === "false" && (settings.imageUrl === "" || typeof settings.imageUrl === "undefined"))
+ settings.numbers = "true";
if (this.settings.imageUrl && (this.settings.imageWidth === 0 || this.settings.imageHeight === 0))
{
@@ -151,7 +151,7 @@ Puzzle.prototype.generateTiles = function()
div.style.backgroundRepeat = "no-repeat";
}
- if (this.settings.imageUrl && this.settings.numbers)
+ if (this.settings.imageUrl && this.settings.numbers === "true")
div.style.color = "#f00";
div.id = "tile" + id;
Please sign in to comment.
Something went wrong with that request. Please try again.