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

Handle 3rd party node trying to use core node-red icon

This commit is contained in:
Nick O'Leary 2018-12-07 16:43:06 +00:00
parent 24b6670bc4
commit 0dd40a941b
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -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";