mirror of https://github.com/xwiki-labs/cryptpad
it's reasonable to expect Util.clone not to explode on undefined/null
This commit is contained in:
parent
3e3fc4f9e4
commit
e59b1fc933
|
@ -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));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue