]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(compiler-core): fix slot source location (#3494)
authorJohnson Chu <johnsoncodehk@gmail.com>
Sat, 27 Mar 2021 15:20:39 +0000 (23:20 +0800)
committerGitHub <noreply@github.com>
Sat, 27 Mar 2021 15:20:39 +0000 (11:20 -0400)
packages/compiler-core/src/parse.ts

index e847d55ed52a8b9eead8cc662730bda0077b1ded..77e91935119d56a0c547c899b2e479e04a840445 100644 (file)
@@ -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),