mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
fix: check filteredItems length before unsafe index access
This commit is contained in:
parent
dbf88a2eca
commit
fbef731a04
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue