it's reasonable to expect Util.clone not to explode on undefined/null

This commit is contained in:
ansuz 2022-10-06 16:10:13 +05:30
parent 3e3fc4f9e4
commit e59b1fc933
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@
}; };
Util.clone = function (o) { Util.clone = function (o) {
if (o === undefined || o === null) { return o; }
return JSON.parse(JSON.stringify(o)); return JSON.parse(JSON.stringify(o));
}; };