diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-07-31 14:52:22 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-07-31 14:52:22 -0700 |
commit | 2e6d6570b5370b1eb32dd633f8909173662af7d1 (patch) | |
tree | 0512f7d251cfe822ea9c244c5ea02069208c69cc /extension/react-app/src/components/ComboBox.tsx | |
parent | 6e57df9cfd372112ebffcd61f16bd7e165cd05cc (diff) | |
download | sncontinue-2e6d6570b5370b1eb32dd633f8909173662af7d1.tar.gz sncontinue-2e6d6570b5370b1eb32dd633f8909173662af7d1.tar.bz2 sncontinue-2e6d6570b5370b1eb32dd633f8909173662af7d1.zip |
docs: :memo: improved troubleshooting docs
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) |