Selaa lähdekoodia

fix(compiler-sfc): transform destructured props when reactivity transform option is enabled (#8252)

fixup https://github.com/vuejs/core/commit/862edfd91a2c2f6b75f943cb1a9682c4be5d7fa8
Haoqun Jiang 3 vuotta sitten
vanhempi
commit
287bd99994
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      packages/compiler-sfc/src/script/definePropsDestructure.ts

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

@@ -103,7 +103,7 @@ export function transformDestructuredProps(
   ctx: ScriptCompileContext,
   vueImportAliases: Record<string, string>
 ) {
-  if (!ctx.options.propsDestructure) {
+  if (!ctx.options.propsDestructure && !ctx.options.reactivityTransform) {
     return
   }