mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 05:03:37 +00:00
Fix WeightedRandomize.js
This commit is contained in:
parent
42ad0ac399
commit
89e4289c9d
1 changed files with 1 additions and 0 deletions
|
@ -53,6 +53,7 @@ var WeightedRandomize = function (tileX, tileY, width, height, weightedIndexes,
|
||||||
randomIndex = Array.isArray(chosen)
|
randomIndex = Array.isArray(chosen)
|
||||||
? chosen[Math.floor(Math.random() * chosen.length)]
|
? chosen[Math.floor(Math.random() * chosen.length)]
|
||||||
: chosen;
|
: chosen;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue