Fix problem in node pull-down menu (#1448)

This commit is contained in:
Kazuhito Yokoi 2017-10-19 21:52:25 +09:00 committed by Nick O'Leary
parent 5b137c457b
commit 298e37ec53
1 changed files with 12 additions and 9 deletions

View File

@ -255,16 +255,19 @@ RED.typeSearch = (function() {
var commonCount = 0; var commonCount = 0;
var item; var item;
for(i=0;i<common.length;i++) { for(i=0;i<common.length;i++) {
item = { var itemDef = RED.nodes.getType(common[i]);
type: common[i], if (itemDef) {
common: true, item = {
def: RED.nodes.getType(common[i]) type: common[i],
}; common: true,
item.label = getTypeLabel(item.type,item.def); def: itemDef
if (i === common.length-1) { };
item.separator = true; item.label = getTypeLabel(item.type,item.def);
if (i === common.length-1) {
item.separator = true;
}
searchResults.editableList('addItem', item);
} }
searchResults.editableList('addItem', item);
} }
for(i=0;i<Math.min(5,recentlyUsed.length);i++) { for(i=0;i<Math.min(5,recentlyUsed.length);i++) {
item = { item = {