Skip to content

Commit

Permalink
fix(compiler-sfc): remove comma of macro definition
Browse files Browse the repository at this point in the history
closes #7422
  • Loading branch information
sxzz committed Dec 28, 2022
1 parent c6e5bda commit e5d0d8e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/compiler-sfc/src/compileScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1219,12 +1219,12 @@ export function compileScript(
} else {
let start = decl.start! + startOffset
let end = decl.end! + startOffset
if (i === 0) {
// first one, locate the start of the next
end = node.declarations[i + 1].start! + startOffset
} else {
// not first one, locate the end of the prev
if (i === total - 1) {
// last one, locate the end of the prev
start = node.declarations[i - 1].end! + startOffset
} else {
// not last one, locate the start of the next
end = node.declarations[i + 1].start! + startOffset
}
s.remove(start, end)
left--
Expand Down

0 comments on commit e5d0d8e

Please sign in to comment.