Jelajahi Sumber

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

山吹色御守 9 bulan lalu
induk
melakukan
ce933390ad
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  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)