qs
I believe that the front end students should probably be no stranger to QS, I am also convinced of him but, but, but. But there was something wrong with my online environment. It took me all afternoon and a good night’s sleep to fix it. (Maybe it was because I’m a terrible person, but I don’t admit it.)
Problem description
One day at noon, the product sent me a message, said the formal environment background page submission is not successful, very urgent!!!! Scared that I did not sleep, began to look at the problem, the page submitted no response, no adjustment interface, no error, Nani?? I’m going to go to the axios padding and I’m going to go to the promise padding and then I’m going to go to the react padding and THEN I’m going to go to the infinite loop. No solution!!!!!! Because Jenkins pack, speed thief pull span, bag can wait 20 minutes, work all afternoon, at the last minute, it reported wrong! Heaven will not destroy me,\
Uncaught (in promise) RangeError: Cyclic object value
So began baidu, know that this is the error caused by circular reference, and then found the QS QS record there is such a problem, has not been solved
The solution
A circular reference is when two objects fight back and forth, and they’re both addressed to the same address
- JSON.stringify+JSON.parse
- for in
- Use Array array.prototype. forEach into copy