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

This commit is contained in:
山吹色御守 2025-07-18 00:58:50 -07:00 committed by GitHub
parent d3af67e878
commit ce933390ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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)