From 9b582781ab0aceaaf1cff7432fed92fa6c205aae Mon Sep 17 00:00:00 2001
From: Nate Sesti <sestinj@gmail.com>
Date: Mon, 11 Sep 2023 13:10:36 -0700
Subject: fix: :bug: fix undefined.filter bug

---
 extension/react-app/src/components/ComboBox.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'extension/react-app/src/components/ComboBox.tsx')

diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx
index c216e7d1..ef577ef3 100644
--- a/extension/react-app/src/components/ComboBox.tsx
+++ b/extension/react-app/src/components/ComboBox.tsx
@@ -316,9 +316,9 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {
 
       // Handle slash commands
       setItems(
-        props.items.filter((item) =>
+        props.items?.filter((item) =>
           item.name.toLowerCase().startsWith(inputValue.toLowerCase())
-        )
+        ) || []
       );
     },
     [
@@ -873,7 +873,7 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {
                   </span>
                 </span>
                 {contextProviders
-                  .filter(
+                  ?.filter(
                     (provider) => !provider.dynamic || provider.requires_query
                   )
                   .find((provider) => provider.title === item.id) && (
-- 
cgit v1.2.3-70-g09d2

