1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

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

View File

@ -255,10 +255,12 @@ 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++) {
var itemDef = RED.nodes.getType(common[i]);
if (itemDef) {
item = { item = {
type: common[i], type: common[i],
common: true, common: true,
def: RED.nodes.getType(common[i]) def: itemDef
}; };
item.label = getTypeLabel(item.type,item.def); item.label = getTypeLabel(item.type,item.def);
if (i === common.length-1) { if (i === common.length-1) {
@ -266,6 +268,7 @@ RED.typeSearch = (function() {
} }
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 = {
type:recentlyUsed[i], type:recentlyUsed[i],