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

Use core category for custom nodes if core nodes disabled

This commit is contained in:
Allen Boone 2015-06-29 14:45:14 -04:00 committed by Nick O'Leary
parent 24afcff0ea
commit bc76499957

View File

@ -147,8 +147,12 @@ RED.palette = (function() {
}
if ($("#palette-base-category-"+rootCategory).length === 0) {
var ns = def.set.id;
createCategoryContainer(rootCategory, RED._(ns+":"+"palette.label."+rootCategory, {defaultValue:rootCategory}));
if(core.indexOf(rootCategory) !== -1){
createCategoryContainer(rootCategory, RED._("node-red:palette.label."+rootCategory, {defaultValue:rootCategory}));
} else {
var ns = def.set.id;
createCategoryContainer(rootCategory, RED._(ns+":palette.label."+rootCategory, {defaultValue:rootCategory}));
}
}
$("#palette-container-"+rootCategory).show();