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 (vuejs#6966)

fix vuejs#6934
  • Loading branch information
ysy945 authored and chrislone committed Feb 4, 2023
1 parent f268d0d commit e260124
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 e260124

Please sign in to comment.