Explorar o código

fix(compiler-sfc): enable props destructure when reactivity transform option is enabled

...to retain backwards compatible behavior before removal
Evan You %!s(int64=3) %!d(string=hai) anos
pai
achega
862edfd91a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/compiler-sfc/src/script/definePropsDestructure.ts

+ 1 - 1
packages/compiler-sfc/src/script/definePropsDestructure.ts

@@ -27,7 +27,7 @@ export function processPropsDestructure(
   ctx: ScriptCompileContext,
   declId: ObjectPattern
 ) {
-  if (!ctx.options.propsDestructure) {
+  if (!ctx.options.propsDestructure && !ctx.options.reactivityTransform) {
     return
   }