Skip to content

Commit

Permalink
fix: init _staticTrees to avoid runtime reference warning
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 authored and aJean committed Aug 19, 2020
1 parent 13e0765 commit 9eb43d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions flow/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ declare interface Component {
_isDestroyed: boolean;
_isBeingDestroyed: boolean;
_vnode: ?VNode; // self root node
_staticTrees: ?Array<VNode>; // v-once cached trees
_hasHookEvent: boolean;
_provided: ?Object;

Expand Down
1 change: 1 addition & 0 deletions src/core/instance/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { isUpdatingChildComponent } from './lifecycle'

export function initRender (vm: Component) {
vm._vnode = null // the root of the child tree
vm._staticTrees = null // v-once cached trees
const options = vm.$options
const parentVnode = vm.$vnode = options._parentVnode // the placeholder node in parent tree
const renderContext = parentVnode && parentVnode.context
Expand Down

0 comments on commit 9eb43d0

Please sign in to comment.