better cloning of node: array copied as copy, nor reference

This commit is contained in:
Лаврёнов Антон
2014-03-08 10:50:53 +08:00
parent d65201a12f
commit 45ddf95629
2 changed files with 6 additions and 5 deletions

View File

@@ -559,7 +559,9 @@
if(this._isObject(obj[key])) {
retObj[key] = this.cloneObject(obj[key]);
}
else {
else if (this._isArray(obj[key])) {
retObj[key] = this.cloneArray(obj[key]);
} else {
retObj[key] = obj[key];
}
}