refactor: Improve array filtering logic in parser.ts
This commit is contained in:
@@ -1014,8 +1014,8 @@ const matcher = (p1:string,matcherArg:matcherArg) => {
|
|||||||
}
|
}
|
||||||
case 'filter':{
|
case 'filter':{
|
||||||
const array = arra[1].split('§')
|
const array = arra[1].split('§')
|
||||||
return array.filter((f) => {
|
return array.filter((f, i) => {
|
||||||
return f !== '' && array.indexOf(f) === array.lastIndexOf(f)
|
return f !== '' && i === array.indexOf(f)
|
||||||
}).join('§')
|
}).join('§')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user