drop back to older clone which clens non-clonables
This commit is contained in:
parent
1f9c666f1c
commit
4fcade4288
2 changed files with 4 additions and 3 deletions
|
|
@ -224,8 +224,9 @@ String.prototype.reverse = function() {
|
|||
};
|
||||
|
||||
Object.clone = function(o) {
|
||||
return structuredClone(o);
|
||||
// return o ? JSON.parse(JSON.stringify(o)) : o;
|
||||
// not using structuredClone because failes with some objects
|
||||
// this method "cleans" out non clonables
|
||||
return o ? JSON.parse(JSON.stringify(o)) : o;
|
||||
};
|
||||
|
||||
Object.toArray = function(o) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue