Skip to content

Commit 5ef9b0a

Browse files
committed
TilemapParser.parseTiledJSON would ignore 'falsey' properties set on Objects in Tiled JSON tilemaps, such as x: 0 or visible: false. These properties are now accurately copied over to the destination map data (thanks @MaksJS phaserjs#1818)
1 parent fcb2dc8 commit 5ef9b0a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/tilemap/TilemapParser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ Phaser.TilemapParser = {
420420
{
421421
var key = fields[k];
422422

423-
if (obj[key])
423+
if (typeof obj[key] !== 'undefined')
424424
{
425425
sliced[key] = obj[key];
426426
}

0 commit comments

Comments
 (0)