Skip to content

Commit e5ea097

Browse files
committed
Fix deepsource
1 parent 789a6cf commit e5ea097

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function onEndCallBack(result: BuildResult, options: React18PluginOptions, write
162162
.replace(regExp2replace2GetVar0, "");
163163
for (let index = 1; index < jsxMatches.length; index++) {
164164
const token = jsxMatches[index];
165-
const toReplace = token.match(/^,.*,$/) ? token.slice(1) : token;
165+
const toReplace = /^,.*,$/.test(token) ? token.slice(1) : token;
166166
txt = txt.replace(toReplace, "");
167167
const v1 = jsxMatches[index]
168168
.replace(regExp2replace2GetVar, "")

0 commit comments

Comments
 (0)