Skip to content

Commit

Permalink
fix(custom-elements): custom element should re-instantiate when inser…
Browse files Browse the repository at this point in the history
…ted again (#6966)

fix #6934
  • Loading branch information
ysy945 authored Nov 11, 2022
1 parent ffef822 commit 67890da
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/runtime-dom/src/apiCustomElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,11 @@ export class VueElement extends BaseClass {
connectedCallback() {
this._connected = true
if (!this._instance) {
this._resolveDef()
if (this._resolved) {
this._update()
} else {
this._resolveDef()
}
}
}

Expand All @@ -214,9 +218,6 @@ export class VueElement extends BaseClass {
* resolve inner component definition (handle possible async component)
*/
private _resolveDef() {
if (this._resolved) {
return
}
this._resolved = true

// set initial attrs
Expand Down

0 comments on commit 67890da

Please sign in to comment.