parent
849b299a77
commit
b47f1bbcd8
|
@ -281,7 +281,7 @@ H5P.cloneObject = function (object, recursive) {
|
||||||
for (var i in object) {
|
for (var i in object) {
|
||||||
if (object.hasOwnProperty(i)) {
|
if (object.hasOwnProperty(i)) {
|
||||||
if (recursive !== undefined && recursive && typeof object[i] === 'object') {
|
if (recursive !== undefined && recursive && typeof object[i] === 'object') {
|
||||||
clone[i] = object[i] instanceof Array ? object[i].slice() : H5P.cloneObject(object[i]);
|
clone[i] = object[i] instanceof Array ? object[i].slice() : H5P.cloneObject(object[i], recursive);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
clone[i] = object[i];
|
clone[i] = object[i];
|
||||||
|
|
Loading…
Reference in New Issue