两种方式会导致该错误:
1、json格式数据存在循环调用。

 
举个例子:
var obj = {
title: '标题'
}
obj.content = obj;
JSON.stringify(obj);

 
执行后,控制台将输出:
Uncaught TypeError: Converting circular structure to JSON
    at Object.stringify (native)
    at <anonymous>:6:6
    at Object.InjectedScript._evaluateOn (<anonymous>:875:140)
    at Object.InjectedScript._evaluateAndWrap (<anonymous>:808:34)
    at Object.InjectedScript.evaluate (<anonymous>:664:21
 
这是一种错误的编辑方式,我们应该禁止这样进行赋值

相关文章:

  • 2021-06-24
  • 2022-12-23
  • 2021-10-07
  • 2022-12-23
  • 2021-07-20
  • 2022-02-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-25
  • 2022-12-23
  • 2022-01-12
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
  • 2022-01-19
相关资源
相似解决方案