Skip to content

Commit

Permalink
fix(editor): Prevent error being thrown in RLC while loading (#11676)
Browse files Browse the repository at this point in the history
  • Loading branch information
elsmr authored and burivuhster committed Nov 14, 2024
1 parent b042aad commit da52b76
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 da52b76

Please sign in to comment.