Skip to content

Commit 792e276

Browse files
committed
fix(customElement): keep appContext during custom element update
1 parent 06310e8 commit 792e276

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/runtime-dom/src/apiCustomElement.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,9 @@ export class VueElement
520520
}
521521

522522
private _update() {
523-
render(this._createVNode(), this._root)
523+
const vnode = this._createVNode()
524+
if (this._app) vnode.appContext = this._app._context
525+
render(vnode, this._root)
524526
}
525527

526528
private _createVNode(): VNode<any, any> {
@@ -573,6 +575,7 @@ export class VueElement
573575
this._setParent()
574576
}
575577
}
578+
576579
return vnode
577580
}
578581

0 commit comments

Comments
 (0)