From: Johnson Chu Date: Sat, 27 Mar 2021 15:20:39 +0000 (+0800) Subject: fix(compiler-core): fix slot source location (#3494) X-Git-Tag: v3.0.9~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e752bddb33b8d150e9f071f15b91a39d326522a3;p=thirdparty%2Fvuejs%2Fcore.git fix(compiler-core): fix slot source location (#3494) --- diff --git a/packages/compiler-core/src/parse.ts b/packages/compiler-core/src/parse.ts index e847d55ed5..77e9193511 100644 --- a/packages/compiler-core/src/parse.ts +++ b/packages/compiler-core/src/parse.ts @@ -623,7 +623,7 @@ function parseAttribute( if (match[2]) { const isSlot = dirName === 'slot' - const startOffset = name.indexOf(match[2]) + const startOffset = name.lastIndexOf(match[2]) const loc = getSelection( context, getNewPosition(context, start, startOffset),