pvorb / clone

deeply clone arbitrary objects in javascript

Home Page:https://www.npmjs.com/package/clone

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

var a={};a.b=a;clone(a);这种循环引用将报错

yangdan8 opened this issue · comments

var a={};a.b=a;clone(a);这种循环引用将报错

Translation from Google:

This circular reference will give an error

It doesn't give an error for me:

$ node
> var clone = require('clone');
undefined
> var a={};a.b=a;clone(a);
{ b: [Circular] }

Are you sure you are using this package? And if so, what version are you using?

I saw easytable reference your deepclone infinite loop, it is estimated that this problem, sorry, did not look at the specific logic in detail