fix(compiler-sfc): correctly remove parens used for wrapping (#3582)

fix #3581
This commit is contained in:
HcySunYang
2021-05-29 04:02:31 +08:00
committed by GitHub
parent 6fbf0dd315
commit 6bfb50aff9
3 changed files with 13 additions and 7 deletions

View File

@@ -352,7 +352,7 @@ export function compileScript(
break
}
}
for (let i = left.end!; i > 0; i++) {
for (let i = right.end!; i > 0; i++) {
const char = source[i + startOffset]
if (char === ')') {
s.remove(i + startOffset, i + startOffset + 1)