]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(compiler-sfc): enable props destructure when reactivity transform option is enabled
authorEvan You <yyx990803@gmail.com>
Sat, 6 May 2023 08:55:38 +0000 (16:55 +0800)
committerEvan You <yyx990803@gmail.com>
Sat, 6 May 2023 08:55:38 +0000 (16:55 +0800)
...to retain backwards compatible behavior before removal

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

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