提交 a49d0613 编写于 作者: D dolymood

fix(create-api): oldOwnerInstance.$off err

#295
上级 eb02e08d
......@@ -107,7 +107,7 @@ export default function createAPIComponent(Vue, Component, events = [], single =
let component = api.open(renderData, renderFn, options)
let oldOwnerInstance = component.__cube__parent
if (oldOwnerInstance !== ownerInstance) {
if (oldOwnerInstance) {
if (oldOwnerInstance && oldOwnerInstance.$on) {
cancelWatchProps(oldOwnerInstance)
oldOwnerInstance.$off(eventBeforeDestroy, oldOwnerInstance.__cube_destroy_handler)
oldOwnerInstance.__cube_destroy_handler = null
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册