diff --git a/bits/20_jsutils.js b/bits/20_jsutils.js index d12c438..2289e1d 100644 --- a/bits/20_jsutils.js +++ b/bits/20_jsutils.js @@ -76,7 +76,7 @@ function str2cc(str) { function dup(o/*:any*/)/*:any*/ { if(typeof JSON != 'undefined') return JSON.parse(JSON.stringify(o)); - if(typeof o != 'object' || !o) return o; + if(typeof o != 'object' || o == null) return o; var out = {}; for(var k in o) if(o.hasOwnProperty(k)) out[k] = dup(o[k]); return out; diff --git a/xlsx.flow.js b/xlsx.flow.js index 1a05868..95f8e80 100644 --- a/xlsx.flow.js +++ b/xlsx.flow.js @@ -1399,7 +1399,7 @@ function str2cc(str) { function dup(o/*:any*/)/*:any*/ { if(typeof JSON != 'undefined') return JSON.parse(JSON.stringify(o)); - if(typeof o != 'object' || !o) return o; + if(typeof o != 'object' || o == null) return o; var out = {}; for(var k in o) if(o.hasOwnProperty(k)) out[k] = dup(o[k]); return out; diff --git a/xlsx.js b/xlsx.js index 7c0ac53..dcc7a8d 100644 --- a/xlsx.js +++ b/xlsx.js @@ -1353,7 +1353,7 @@ function str2cc(str) { function dup(o) { if(typeof JSON != 'undefined') return JSON.parse(JSON.stringify(o)); - if(typeof o != 'object' || !o) return o; + if(typeof o != 'object' || o == null) return o; var out = {}; for(var k in o) if(o.hasOwnProperty(k)) out[k] = dup(o[k]); return out;