mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Distinguish between Arrays and Objects when cloning in Cache.getJSON.
Fixes #2551.
This commit is contained in:
parent
0880380ea9
commit
346aed2866
1 changed files with 2 additions and 1 deletions
|
@ -1312,7 +1312,8 @@ Phaser.Cache.prototype = {
|
|||
{
|
||||
if (clone)
|
||||
{
|
||||
return Phaser.Utils.extend(true, {}, data);
|
||||
var base = Array.isArray(data) ? [] : {};
|
||||
return Phaser.Utils.extend(true, base, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue