forked from sheetjs/sheetjs
better dup check (fixes #316)
This commit is contained in:
parent
912d586e8b
commit
ea7a951506
@ -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;
|
||||
|
@ -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;
|
||||
|
2
xlsx.js
2
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;
|
||||
|
Loading…
Reference in New Issue
Block a user