fix: 🐛 fix undefined.filter bug
This commit is contained in:
parent
9687ddcec9
commit
9b582781ab
1 changed files with 3 additions and 3 deletions
|
|
@ -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) && (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue