Skip to content

Commit

Permalink
fix(custom-element): keep instance.isCE for backwards compat
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Aug 15, 2024
1 parent 3d6f015 commit e19fc27
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/runtime-core/src/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,15 @@ export interface ComponentInternalInstance {
*/
inheritAttrs?: boolean
/**
* is custom element?
* Custom Element instance (if component is created by defineCustomElement)
* @internal
*/
ce?: ComponentCustomElementInterface
/**
* is custom element? (kept only for compatibility)
* @internal
*/
isCE?: boolean
/**
* custom element specific HMR method
* @internal
Expand Down
1 change: 1 addition & 0 deletions packages/runtime-dom/src/apiCustomElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ export class VueElement
vnode.ce = instance => {
this._instance = instance
instance.ce = this
instance.isCE = true // for vue-i18n backwards compat
// HMR
if (__DEV__) {
instance.ceReload = newStyles => {
Expand Down

0 comments on commit e19fc27

Please sign in to comment.