From 44fb0e208605197266a18070a7ba6a09be499fbf Mon Sep 17 00:00:00 2001 From: James Pettit Date: Tue, 19 Jan 2021 15:17:12 -0800 Subject: [PATCH] Fix typing of MapData objects. I believe that objects is going to be an array as the result of calling this function: https://github.com/photonstorm/phaser/blob/7834095789fd3ac24ee0146e65eefa096b22b1d6/src/tilemaps/parsers/tiled/ParseObjectLayers.js#L20 I'm not 100% sure on the type of the array elements (Phaser.Types.Tilemaps.ObjectLayerConfig), but that appears to be what ParseObjectLayers returns. --- src/tilemaps/mapdata/MapData.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tilemaps/mapdata/MapData.js b/src/tilemaps/mapdata/MapData.js index 1a19fda94..1cbb48f92 100644 --- a/src/tilemaps/mapdata/MapData.js +++ b/src/tilemaps/mapdata/MapData.js @@ -173,10 +173,10 @@ var MapData = new Class({ * An object of Tiled Object Layers. * * @name Phaser.Tilemaps.MapData#objects - * @type {object} + * @type {Phaser.Types.Tilemaps.ObjectLayerConfig[]} * @since 3.0.0 */ - this.objects = GetFastValue(config, 'objects', {}); + this.objects = GetFastValue(config, 'objects', []); /** * An object of collision data. Must be created as physics object or will return undefined.