From e59b1fc933dca2b7869e9e9dc3a27636f8ec12ff Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 6 Oct 2022 16:10:13 +0530 Subject: [PATCH] it's reasonable to expect Util.clone not to explode on undefined/null --- www/common/common-util.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/common/common-util.js b/www/common/common-util.js index efcb46227..05da8bf93 100644 --- a/www/common/common-util.js +++ b/www/common/common-util.js @@ -36,6 +36,7 @@ }; Util.clone = function (o) { + if (o === undefined || o === null) { return o; } return JSON.parse(JSON.stringify(o)); };