Skip to content

Commit 58f1df3

Browse files
authored
refactor: first character judgment replacement regexp (#18658)
1 parent 74221c3 commit 58f1df3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vite/rollupLicensePlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function sortLicenses(licenses: Set<string>) {
127127
let withParenthesis: string[] = []
128128
let noParenthesis: string[] = []
129129
licenses.forEach((license) => {
130-
if (/^\(/.test(license)) {
130+
if (license[0] === '(') {
131131
withParenthesis.push(license)
132132
} else {
133133
noParenthesis.push(license)

0 commit comments

Comments
 (0)