fix options filter

This commit is contained in:
LenAnderson 2024-04-17 09:02:10 -04:00
parent 10e786dfd3
commit 04fca9f370
1 changed files with 1 additions and 1 deletions

View File

@ -2067,7 +2067,7 @@ export async function setSlashCommandAutoComplete(textarea, isFloating = false)
else {
let matchingOptions = parserResult.optionList
.filter(it => isReplacable || it.name == '' ? matchers[matchType](it.name) : it.name.toLowerCase() == slashCommand) // Filter by the input
.filter((it,idx,list) => list.indexOf(it) == idx)
.filter((it,idx,list) => list.findIndex(opt=>opt.value == it.value) == idx)
;
result = matchingOptions
.filter((it,idx) => matchingOptions.indexOf(it) == idx)