From 54a82befa08ec8b58fcbd91d2c585322903fbdef Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sat, 23 Nov 2024 17:07:13 +0000 Subject: [PATCH] Chore: Fixed GotoAnything handling of search keywords --- packages/app-desktop/plugins/GotoAnything.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/app-desktop/plugins/GotoAnything.tsx b/packages/app-desktop/plugins/GotoAnything.tsx index aed524e3e..e7aa07dff 100644 --- a/packages/app-desktop/plugins/GotoAnything.tsx +++ b/packages/app-desktop/plugins/GotoAnything.tsx @@ -379,8 +379,10 @@ class DialogComponent extends React.PureComponent { const keywordRegexes = (await this.keywords(searchQuery)).map(term => { if (typeof term === 'string') { return new RegExp(escapeRegExp(term), 'ig'); - } else { + } else if (term.valueRegex) { return new RegExp(removeDiacritics(term.valueRegex), 'ig'); + } else { + return new RegExp(escapeRegExp(term.value), 'ig'); } });