Skip to content

Commit

Permalink
refactor: remove no longer needed _staticTrees property
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Oct 11, 2017
1 parent 53431c6 commit bb1d888
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion flow/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ declare interface Component {
_isDestroyed: boolean;
_isBeingDestroyed: boolean;
_vnode: ?VNode; // self root node
_staticTrees: ?Array<VNode>;
_hasHookEvent: boolean;
_provided: ?Object;

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

export function initRender (vm: Component) {
vm._vnode = null // the root of the child tree
vm._staticTrees = null
const parentVnode = vm.$vnode = vm.$options._parentVnode // the placeholder node in parent tree
const renderContext = parentVnode && parentVnode.context
vm.$slots = resolveSlots(vm.$options._renderChildren, renderContext)
Expand Down Expand Up @@ -59,11 +58,7 @@ export function renderMixin (Vue: Class<Component>) {

Vue.prototype._render = function (): VNode {
const vm: Component = this
const {
render,
staticRenderFns,
_parentVnode
} = vm.$options
const { render, _parentVnode } = vm.$options

if (vm._isMounted) {
// if the parent didn't update, the slot nodes will be the ones from
Expand All @@ -78,9 +73,6 @@ export function renderMixin (Vue: Class<Component>) {

vm.$scopedSlots = (_parentVnode && _parentVnode.data.scopedSlots) || emptyObject

if (staticRenderFns && !vm._staticTrees) {
vm._staticTrees = []
}
// set parent vnode. this allows render functions to have access
// to the data on the placeholder node.
vm.$vnode = _parentVnode
Expand Down

0 comments on commit bb1d888

Please sign in to comment.