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:
parent
24b6670bc4
commit
0dd40a941b
@ -789,7 +789,11 @@ RED.utils = (function() {
|
|||||||
return RED.settings.apiRootUrl+"icons/"+iconPath.module+"/"+iconPath.file;
|
return RED.settings.apiRootUrl+"icons/"+iconPath.module+"/"+iconPath.file;
|
||||||
}
|
}
|
||||||
} else {
|
} 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";
|
return RED.settings.apiRootUrl+"icons/node-red/subflow.png";
|
||||||
} else {
|
} else {
|
||||||
return RED.settings.apiRootUrl+"icons/node-red/arrow-in.png";
|
return RED.settings.apiRootUrl+"icons/node-red/arrow-in.png";
|
||||||
|
Loading…
Reference in New Issue
Block a user