We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46c3866 commit 0b902e0Copy full SHA for 0b902e0
src/shared/util.js
@@ -211,7 +211,12 @@ export function looseEqual (a: mixed, b: mixed): boolean {
211
const isObjectA = isObject(a)
212
const isObjectB = isObject(b)
213
if (isObjectA && isObjectB) {
214
- return JSON.stringify(a) === JSON.stringify(b)
+ try {
215
+ return JSON.stringify(a) === JSON.stringify(b)
216
+ } catch (e) {
217
+ // possible circular reference
218
+ return a === b
219
+ }
220
} else if (!isObjectA && !isObjectB) {
221
return String(a) === String(b)
222
} else {
0 commit comments