Skip to content

Commit

Permalink
fix: do not traverse VNodes when regsitering dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 authored and aJean committed Aug 19, 2020
1 parent 45ff548 commit a61b514
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/observer/traverse.js
Expand Up @@ -2,6 +2,7 @@

import { _Set as Set, isObject } from '../util/index'
import type { SimpleSet } from '../util/index'
import VNode from '../vdom/vnode'

const seenObjects = new Set()

Expand All @@ -18,7 +19,7 @@ export function traverse (val: any) {
function _traverse (val: any, seen: SimpleSet) {
let i, keys
const isA = Array.isArray(val)
if ((!isA && !isObject(val)) || Object.isFrozen(val)) {
if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
return
}
if (val.__ob__) {
Expand Down

0 comments on commit a61b514

Please sign in to comment.