From db5000935306214b31e33865cd57935e80e27d41 Mon Sep 17 00:00:00 2001 From: Rahul Kadyan Date: Sat, 4 Apr 2020 06:40:22 +0530 Subject: [PATCH] fix(compiler-sfc): always use offset for template block sourcemaps (#911) --- packages/compiler-sfc/src/parse.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-sfc/src/parse.ts b/packages/compiler-sfc/src/parse.ts index da375364..0d834a93 100644 --- a/packages/compiler-sfc/src/parse.ts +++ b/packages/compiler-sfc/src/parse.ts @@ -147,7 +147,7 @@ export function parse( source, block.content, sourceRoot, - pad ? 0 : block.loc.start.line - 1 + !pad || block.type === 'template' ? block.loc.start.line - 1 : 0 ) } }