mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Merge pull request #2552 from drhayes/dev
Distinguish between Arrays and Objects when cloning in Cache.getJSON.
This commit is contained in:
commit
7108bc3de3
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