fix(watch): fix deep watchers on refs containing primitives (#984)

This commit is contained in:
Carlos Rodrigues
2020-04-17 14:55:41 +01:00
committed by GitHub
parent c0adb67c2e
commit 99fd158d09
2 changed files with 20 additions and 0 deletions

View File

@@ -286,6 +286,9 @@ export function instanceWatch(
function traverse(value: unknown, seen: Set<unknown> = new Set()) {
if (!isObject(value) || seen.has(value)) {
return value
}
if (seen.has(value)) {
return
}
seen.add(value)