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
1 changed files with 6 additions and 2 deletions

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();