浏览代码

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

...to retain backwards compatible behavior before removal
Evan You 3 年之前
父节点
当前提交
862edfd91a
共有 1 个文件被更改,包括 1 次插入1 次删除
  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
   }