Skip to content

Commit db50009

Browse files
authored
fix(compiler-sfc): always use offset for template block sourcemaps (#911)
1 parent f3b6559 commit db50009

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/compiler-sfc/src/parse.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export function parse(
147147
source,
148148
block.content,
149149
sourceRoot,
150-
pad ? 0 : block.loc.start.line - 1
150+
!pad || block.type === 'template' ? block.loc.start.line - 1 : 0
151151
)
152152
}
153153
}

0 commit comments

Comments
 (0)