diff --git a/packages/editor-ui/src/components/ResourceLocator/ResourceLocatorDropdown.vue b/packages/editor-ui/src/components/ResourceLocator/ResourceLocatorDropdown.vue index 01c7b4071d22a..a4e00af9f73bd 100644 --- a/packages/editor-ui/src/components/ResourceLocator/ResourceLocatorDropdown.vue +++ b/packages/editor-ui/src/components/ResourceLocator/ResourceLocatorDropdown.vue @@ -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); + } } }