From 898928b686261590bd35f653f2324d08f7404896 Mon Sep 17 00:00:00 2001 From: Hyunje Jun Date: Tue, 18 Oct 2016 11:00:22 +0900 Subject: [PATCH] Don't do type-safe comparison on null Resolve #537. --- src/js/lib/helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/lib/helper.js b/src/js/lib/helper.js index b30fb08..a72f2e5 100644 --- a/src/js/lib/helper.js +++ b/src/js/lib/helper.js @@ -8,7 +8,7 @@ var toInt = exports.toInt = function (x) { }; var clone = exports.clone = function (obj) { - if (obj === null) { + if (!obj) { return null; } else if (obj.constructor === Array) { return obj.map(clone);