Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(core): avoid observing VNodes
  • Loading branch information
yyx990803 authored and ztlevi committed Feb 14, 2018
1 parent a5f59e9 commit 951ae61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/observer/index.js
@@ -1,6 +1,7 @@
/* @flow */

import Dep from './dep'
import VNode from '../vdom/vnode'
import { arrayMethods } from './array'
import {
def,
Expand Down Expand Up @@ -104,7 +105,7 @@ function copyAugment (target: Object, src: Object, keys: Array<string>) {
* or the existing observer if the value already has one.
*/
export function observe (value: any, asRootData: ?boolean): Observer | void {
if (!isObject(value)) {
if (!isObject(value) || value instanceof VNode) {
return
}
let ob: Observer | void
Expand Down

0 comments on commit 951ae61

Please sign in to comment.