Don't do type-safe comparison on null

Resolve #537.
This commit is contained in:
Hyunje Jun 2016-10-18 11:00:22 +09:00
parent ce7146121f
commit 898928b686

View File

@ -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);