From 80c571963c0ada30ece864e83ad3d77600d3b96e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 13:06:04 +0100 Subject: [PATCH] `Textures.Parsers.JSONHash` will now perform a `hasOwnProperty` check when iterating the frames, skipping anything that isn't a direct property. This should allow you to use generated atlas data that comes from `JSON.parse`. Fix #4768 --- src/textures/parsers/JSONHash.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/textures/parsers/JSONHash.js b/src/textures/parsers/JSONHash.js index bb201531f..32c9d44bc 100644 --- a/src/textures/parsers/JSONHash.js +++ b/src/textures/parsers/JSONHash.js @@ -41,6 +41,11 @@ var JSONHash = function (texture, sourceIndex, json) for (var key in frames) { + if (!frames.hasOwnProperty(key)) + { + continue; + } + var src = frames[key]; // The frame values are the exact coordinates to cut the frame out of the atlas from