Skip to content

Commit 4459b87

Browse files
committedSep 15, 2017
fix(core): avoid observing VNodes
fix #6610
1 parent 8164ce6 commit 4459b87

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

Diff for: ‎src/core/observer/index.js

+2-1
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)