Skip to content

Commit

Permalink
compare string value, not boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
crdx committed Nov 7, 2012
1 parent 0faa79d commit dc731ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions game.js
Expand Up @@ -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))
{
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit dc731ce

Please sign in to comment.