提交 ea7a9515 编写于 作者: F František Žiačik 提交者: SheetJS

better dup check (fixes #316)

上级 912d586e
......@@ -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;
......
此差异由.gitattributes 抑制。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册