Skip to content

Commit

Permalink
fix: ref should exec after componentDidMount hook
Browse files Browse the repository at this point in the history
  • Loading branch information
yuche committed Mar 6, 2018
1 parent 76bbec5 commit 7bf5efa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nerv/src/lifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function mountComponent (
readyComponents.push(component)
}
if (!isNullOrUndef(ref)) {
Ref.attach(vnode, ref, vnode.dom as Element)
readyComponents.push(() => Ref.attach(vnode, ref, vnode.dom as Element))
}
const dom = (vnode.dom = mountVNode(
rendered,
Expand Down

0 comments on commit 7bf5efa

Please sign in to comment.