Use type label if suggestion doesn't provide one

This commit is contained in:
Nick O'Leary
2025-06-25 14:21:09 +01:00
parent b2d6eeadbd
commit 1552fe20c5

View File

@@ -486,6 +486,9 @@ RED.typeSearch = (function() {
i: suggestionItem.i,
...suggestion
}
if (!suggestion.label && suggestion.nodes && suggestion.nodes.length === 1 && suggestion.nodes[0].type) {
suggestedItem.label = getTypeLabel(suggestion.nodes[0].type, RED.nodes.getType(suggestion.nodes[0].type));
}
searchResults.editableList('addItem', suggestedItem);
})
})