mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
Updated Cache docs.
This commit is contained in:
parent
ad3641830d
commit
7817d47a25
1 changed files with 2 additions and 3 deletions
|
@ -1302,7 +1302,7 @@ Phaser.Cache.prototype = {
|
|||
* @method Phaser.Cache#getJSON
|
||||
* @param {string} key - The key of the asset to retrieve from the cache.
|
||||
* @param {boolean} [clone=false] - Return a clone of the original object (true) or a reference to it? (false)
|
||||
* @return {object} The JSON object.
|
||||
* @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.
|
||||
*/
|
||||
getJSON: function (key, clone) {
|
||||
|
||||
|
@ -1312,8 +1312,7 @@ Phaser.Cache.prototype = {
|
|||
{
|
||||
if (clone)
|
||||
{
|
||||
var base = Array.isArray(data) ? [] : {};
|
||||
return Phaser.Utils.extend(true, base, data);
|
||||
return Phaser.Utils.extend(true, Array.isArray(data) ? [] : {}, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue