Skip to content
Browse files

compare string value, not boolean

  • Loading branch information...
1 parent 0faa79d commit dc731ce35be402c8f35c462dcbfc681cbd9e09c3 @crdx committed Nov 7, 2012
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;

0 comments on commit dc731ce

Please sign in to comment.
Something went wrong with that request. Please try again.