Skip to content

Commit ea5a355

Browse files
authored
fix: replace includes check with instanceof RegExp
fix: replace includes check with instanceof RegExp
2 parents fdfa51b + 0749935 commit ea5a355

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/wicked-walls-marry.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@alita/plugins': patch
3+
---
4+
5+
replace includes check with instanceof RegExp

packages/plugins/src/hd.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default (api: AlitaApi) => {
7272
// 将正则转成字符串
7373
selectorDoubleList: px2remConfig.selectorDoubleRemList.map(
7474
(i: string) => {
75-
if (!i.includes('/')) return i;
75+
if (!(i instanceof RegExp)) return i;
7676
const reStr = `${i}`.replaceAll('/', '');
7777
if (hasMagicChars(reStr)) {
7878
return reStr;

0 commit comments

Comments
 (0)