From 0dd40a941b5d1448cd1b88315cbe93657e0b5a5b Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 7 Dec 2018 16:43:06 +0000 Subject: [PATCH] Handle 3rd party node trying to use core node-red icon --- .../node_modules/@node-red/editor-client/src/js/ui/utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/utils.js b/packages/node_modules/@node-red/editor-client/src/js/ui/utils.js index d8a4f1e7d..1e924405c 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/utils.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/utils.js @@ -789,7 +789,11 @@ RED.utils = (function() { return RED.settings.apiRootUrl+"icons/"+iconPath.module+"/"+iconPath.file; } } else { - if (def.category === 'subflows') { + // This could be a non-core node trying to use a core icon. + iconPath.module = 'node-red'; + if (isIconExists(iconPath)) { + return RED.settings.apiRootUrl+"icons/"+iconPath.module+"/"+iconPath.file; + } else if (def.category === 'subflows') { return RED.settings.apiRootUrl+"icons/node-red/subflow.png"; } else { return RED.settings.apiRootUrl+"icons/node-red/arrow-in.png";