From 04fca9f3700193d930ae32e499bb667e508fe270 Mon Sep 17 00:00:00 2001 From: LenAnderson Date: Wed, 17 Apr 2024 09:02:10 -0400 Subject: [PATCH] fix options filter --- public/scripts/slash-commands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/slash-commands.js b/public/scripts/slash-commands.js index 1ce22a97d..4e1ea31af 100644 --- a/public/scripts/slash-commands.js +++ b/public/scripts/slash-commands.js @@ -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)