Skip to content

Commit

Permalink
fix(compile-sfc): generate setup prop type format error
Browse files Browse the repository at this point in the history
  • Loading branch information
webfansplz committed Sep 3, 2021
1 parent 3ad9dc4 commit 3bf9068
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/compiler-sfc/src/compileScript.ts
Expand Up @@ -623,7 +623,11 @@ export function compileScript(
) +
', '
} else {
res += scriptSetupSource.slice(m.start!, m.end!) + `, `
const propTypeSource = scriptSetupSource.slice(m.start!, m.end!)
res +=
(propTypeSource.includes(';')
? propTypeSource.slice(0, -1)
: propTypeSource) + `, `
}
}
}
Expand Down

0 comments on commit 3bf9068

Please sign in to comment.