We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught TypeError: Converting circular structure to JSON --> starting at object with constructor 'Object' | property 'children' -> object with constructor 'Array' | index 0 -> object with constructor 'Object' --- property 'parent' closes the circle at JSON.stringify (<anonymous>) at D.rn [as refresh] (MindElixir.js:1484:29)
// 版本 - mind-elixir@^3.0.0 const data = { nodeData: { id: 'root', topic: 'root', children: [ { id: 'sub1', topic: 'sub1', children: [ { id: 'sub2', topic: 'sub2', }, ], }, ], }, } mind.init(data) // 此处报错 mind.refresh(data)
The text was updated successfully, but these errors were encountered:
初始化导入时移除 mind.refresh(data) 即可修复此问题
Sorry, something went wrong.
同一个对象的话其实是不用传data的,出现这个问题的原因是初始化的时候把parent字段插进去了导致循环,我也在考虑初始化之前深拷贝一次
data
parent
No branches or pull requests
异常
复现
The text was updated successfully, but these errors were encountered: