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

fix(compiler-core): recognize empty string as non-identifier (#12553)

山吹色御守 9 месяцев назад
Родитель
Сommit
ce933390ad
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/compiler-core/src/utils.ts

+ 1 - 1
packages/compiler-core/src/utils.ts

@@ -63,7 +63,7 @@ export function isCoreComponent(tag: string): symbol | void {
   }
 }
 
-const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/
+const nonIdentifierRE = /^$|^\d|[^\$\w\xA0-\uFFFF]/
 export const isSimpleIdentifier = (name: string): boolean =>
   !nonIdentifierRE.test(name)