diff options
Diffstat (limited to 'extension/react-app/src/components/ComboBox.tsx')
-rw-r--r-- | extension/react-app/src/components/ComboBox.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx index da559383..ba87cb9f 100644 --- a/extension/react-app/src/components/ComboBox.tsx +++ b/extension/react-app/src/components/ComboBox.tsx @@ -169,12 +169,12 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { props.onInputValueChange(inputValue); if (inputValue.endsWith("@") || currentlyInContextQuery) { - const segs = inputValue.split("@"); + const segs = inputValue?.split("@") || []; if (segs.length > 1) { // Get search results and return setCurrentlyInContextQuery(true); - const providerAndQuery = segs[segs.length - 1]; + const providerAndQuery = segs[segs.length - 1] || ""; const [provider, query] = providerAndQuery.split(" "); searchClient .index(SEARCH_INDEX_NAME) |