]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(custom-element): keep instance.isCE for backwards compat
authorEvan You <evan@vuejs.org>
Thu, 15 Aug 2024 07:18:19 +0000 (15:18 +0800)
committerEvan You <evan@vuejs.org>
Thu, 15 Aug 2024 07:18:19 +0000 (15:18 +0800)
packages/runtime-core/src/component.ts
packages/runtime-dom/src/apiCustomElement.ts

index 24cf9000374dd2cc950fb1918ae256edf00aad97..46608ae2d5d3e45b1e22cae2cd1ecef3400a322f 100644 (file)
@@ -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
index efee4d8a9c152f1542330501fc64ea3da87729fd..79b7eea80942d819476ea0021d47d0c6c9ad6424 100644 (file)
@@ -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 => {