Added cancel button.

Fixed bug in object cloning.
namespaces
Frode Petterson 2013-04-17 20:40:13 +02:00
parent 849b299a77
commit b47f1bbcd8
1 changed files with 1 additions and 1 deletions

View File

@ -281,7 +281,7 @@ H5P.cloneObject = function (object, recursive) {
for (var i in object) {
if (object.hasOwnProperty(i)) {
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 {
clone[i] = object[i];