Browse Source

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

...to retain backwards compatible behavior before removal
Evan You 3 years ago
parent
commit
862edfd91a
1 changed files with 1 additions and 1 deletions
  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,
   ctx: ScriptCompileContext,
   declId: ObjectPattern
   declId: ObjectPattern
 ) {
 ) {
-  if (!ctx.options.propsDestructure) {
+  if (!ctx.options.propsDestructure && !ctx.options.reactivityTransform) {
     return
     return
   }
   }