Permalink
Browse files

separate initRender and initial mounting (fix #4693)

  • Loading branch information...
1 parent b60182d commit 7131bc48155fb5224f4d6f0fb1c4b7eed6a79db4 @yyx990803 yyx990803 committed Jan 11, 2017
Showing with 4 additions and 4 deletions.
  1. +4 −1 src/core/instance/init.js
  2. +0 −3 src/core/instance/render.js
@@ -39,10 +39,13 @@ export function initMixin (Vue: Class<Component>) {
vm._self = vm
initLifecycle(vm)
initEvents(vm)
+ initRender(vm)
callHook(vm, 'beforeCreate')
initState(vm)
callHook(vm, 'created')
- initRender(vm)
+ if (vm.$options.el) {
+ vm.$mount(vm.$options.el)
+ }
}
}
@@ -40,9 +40,6 @@ export function initRender (vm: Component) {
// normalization is always applied for the public version, used in
// user-written render functions.
vm.$createElement = (a, b, c, d) => createElement(vm, a, b, c, d, true)
- if (vm.$options.el) {
- vm.$mount(vm.$options.el)
- }
}
export function renderMixin (Vue: Class<Component>) {

0 comments on commit 7131bc4

Please sign in to comment.