File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1302,7 +1302,7 @@ Phaser.Cache.prototype = {
13021302 * @method Phaser.Cache#getJSON
13031303 * @param {string } key - The key of the asset to retrieve from the cache.
13041304 * @param {boolean } [clone=false] - Return a clone of the original object (true) or a reference to it? (false)
1305- * @return {object } The JSON object.
1305+ * @return {object } The JSON object, or an Array if the key points to an Array property. If the property wasn't found, it returns null .
13061306 */
13071307 getJSON : function ( key , clone ) {
13081308
@@ -1312,8 +1312,7 @@ Phaser.Cache.prototype = {
13121312 {
13131313 if ( clone )
13141314 {
1315- var base = Array . isArray ( data ) ? [ ] : { } ;
1316- return Phaser . Utils . extend ( true , base , data ) ;
1315+ return Phaser . Utils . extend ( true , Array . isArray ( data ) ? [ ] : { } , data ) ;
13171316 }
13181317 else
13191318 {
You can’t perform that action at this time.
0 commit comments