From 9eb43d0e6b9b9df5714c79a4eb1145879f2e62a2 Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 17 Nov 2017 09:45:03 -0500 Subject: [PATCH] fix: init _staticTrees to avoid runtime reference warning fix #7075 --- flow/component.js | 1 + src/core/instance/render.js | 1 + 2 files changed, 2 insertions(+) diff --git a/flow/component.js b/flow/component.js index 5286944553c..9fbade0b6e6 100644 --- a/flow/component.js +++ b/flow/component.js @@ -66,6 +66,7 @@ declare interface Component { _isDestroyed: boolean; _isBeingDestroyed: boolean; _vnode: ?VNode; // self root node + _staticTrees: ?Array; // v-once cached trees _hasHookEvent: boolean; _provided: ?Object; diff --git a/src/core/instance/render.js b/src/core/instance/render.js index f83dc94fff7..391e124e2fc 100644 --- a/src/core/instance/render.js +++ b/src/core/instance/render.js @@ -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