mirror of
https://github.com/open-webui/open-webui
synced 2025-01-29 13:58:09 +00:00
fix: check filteredItems
length before unsafe index access
This commit is contained in:
parent
dbf88a2eca
commit
fbef731a04
@ -243,7 +243,7 @@
|
||||
placeholder={searchPlaceholder}
|
||||
autocomplete="off"
|
||||
on:keydown={(e) => {
|
||||
if (e.code === 'Enter') {
|
||||
if (e.code === 'Enter' && filteredItems.length > 0) {
|
||||
value = filteredItems[selectedModelIdx].value;
|
||||
show = false;
|
||||
return; // dont need to scroll on selection
|
||||
|
Loading…
Reference in New Issue
Block a user