From bc76499957c213fcca537598e47cc2bf63ae781c Mon Sep 17 00:00:00 2001 From: Allen Boone Date: Mon, 29 Jun 2015 14:45:14 -0400 Subject: [PATCH] Use core category for custom nodes if core nodes disabled --- editor/js/ui/palette.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/editor/js/ui/palette.js b/editor/js/ui/palette.js index c4bb6fbca..2f8ec047b 100644 --- a/editor/js/ui/palette.js +++ b/editor/js/ui/palette.js @@ -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();