From 535a390bedd916e27b5c1d2f92ecf96378b06725 Mon Sep 17 00:00:00 2001 From: JulienCandy <88577130+JulienCandy@users.noreply.github.com> Date: Tue, 9 Jul 2024 22:42:21 +0300 Subject: [PATCH] Update plugins.js I guess by default it is assumed you have at least one tile in the tileset that has a custom "name" property, which might not be the case. This make sure it works even when no custom properties where added to the tileset. --- plugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins.js b/plugins.js index 69b2ca3..e102e10 100644 --- a/plugins.js +++ b/plugins.js @@ -4390,7 +4390,7 @@ GA.plugins = function(ga) { //matches the current tile, and that sub-object has a `name` property, //then create a sprite and assign the tile properties onto //the sprite - if (tileproperties[key] && tileproperties[key].name) { + if (typeof tileproperties !== 'undefined' && tileproperties[key] && tileproperties[key].name) { //Make a sprite tileSprite = ga.sprite(texture);