From: Evan You Date: Sat, 6 May 2023 08:55:38 +0000 (+0800) Subject: fix(compiler-sfc): enable props destructure when reactivity transform option is enabled X-Git-Tag: v3.3.0-beta.5~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=862edfd91a2c2f6b75f943cb1a9682c4be5d7fa8;p=thirdparty%2Fvuejs%2Fcore.git fix(compiler-sfc): enable props destructure when reactivity transform option is enabled ...to retain backwards compatible behavior before removal --- diff --git a/packages/compiler-sfc/src/script/definePropsDestructure.ts b/packages/compiler-sfc/src/script/definePropsDestructure.ts index f735b324eb..3d2c3d3844 100644 --- a/packages/compiler-sfc/src/script/definePropsDestructure.ts +++ b/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 }