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

Ensure node default color is used if palette.theme has no match

This commit is contained in:
Nick O'Leary 2018-08-24 13:08:49 +01:00
parent db1b0ccb79
commit c1a1a73599
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -800,8 +800,9 @@ RED.utils = (function() {
var paletteTheme = RED.settings.theme('palette.theme') || []; var paletteTheme = RED.settings.theme('palette.theme') || [];
if (paletteTheme.length > 0) { if (paletteTheme.length > 0) {
if (!nodeColorCache.hasOwnProperty(type)) { if (!nodeColorCache.hasOwnProperty(type)) {
nodeColorCache[type] = def.color;
var l = paletteTheme.length; var l = paletteTheme.length;
for (var i=0;i<l;i++ ){ for (var i = 0; i < l; i++ ){
var themeRule = paletteTheme[i]; var themeRule = paletteTheme[i];
if (themeRule.hasOwnProperty('category')) { if (themeRule.hasOwnProperty('category')) {
if (!themeRule.hasOwnProperty('_category')) { if (!themeRule.hasOwnProperty('_category')) {