Просмотр исходного кода

wip: fix defineOptions specifier removal

Evan You 5 лет назад
Родитель
Сommit
dfac6eee99
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/compiler-sfc/src/compileScript.ts

+ 1 - 1
packages/compiler-sfc/src/compileScript.ts

@@ -545,7 +545,7 @@ export function compileScript(
         removed++
         s.remove(
           prev ? prev.end! + startOffset : node.start! + startOffset,
-          next ? next.start! + startOffset : node.end! + startOffset
+          next && !prev ? next.start! + startOffset : node.end! + startOffset
         )
       }