Skip to content

Commit

Permalink
Prevent error being thrown in RLC while loading
Browse files Browse the repository at this point in the history
  • Loading branch information
elsmr committed Nov 11, 2024
1 parent c0aa67b commit 2c1838b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,12 @@ function onKeyDown(e: KeyboardEvent) {
}
}
} else if (e.key === 'Enter') {
emit('update:modelValue', sortedResources.value[hoverIndex.value].value);
const selected = sortedResources.value[hoverIndex.value]?.value;
// Selected resource can be empty when loading or empty results
if (selected) {
emit('update:modelValue', selected);
}
}
}
Expand Down

0 comments on commit 2c1838b

Please sign in to comment.