Skip to content

Commit 834929b

Browse files
yyx990803hefeng
authored andcommitted
fix(core): avoid observing VNodes
fix vuejs#6610
1 parent 6982a48 commit 834929b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/observer/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* @flow */
22

33
import Dep from './dep'
4+
import VNode from '../vdom/vnode'
45
import { arrayMethods } from './array'
56
import {
67
def,
@@ -104,7 +105,7 @@ function copyAugment (target: Object, src: Object, keys: Array<string>) {
104105
* or the existing observer if the value already has one.
105106
*/
106107
export function observe (value: any, asRootData: ?boolean): Observer | void {
107-
if (!isObject(value)) {
108+
if (!isObject(value) || value instanceof VNode) {
108109
return
109110
}
110111
let ob: Observer | void

0 commit comments

Comments
 (0)