mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
3104c17fb3
commit
98172764ac
@ -856,6 +856,7 @@ RED.utils = (function() {
|
|||||||
obj[key] = value;
|
obj[key] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function separateIconPath(icon) {
|
function separateIconPath(icon) {
|
||||||
var result = {module: "", file: ""};
|
var result = {module: "", file: ""};
|
||||||
if (icon) {
|
if (icon) {
|
||||||
@ -863,10 +864,10 @@ RED.utils = (function() {
|
|||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
icon = icon.substring((RED.settings.apiRootUrl+'icons/').length);
|
icon = icon.substring((RED.settings.apiRootUrl+'icons/').length);
|
||||||
}
|
}
|
||||||
index = icon.indexOf('/');
|
var match = /^((?:@[^/]+\/)?[^/]+)\/(.*)$/.exec(icon);
|
||||||
if (index !== -1) {
|
if (match) {
|
||||||
result.module = icon.slice(0, index);
|
result.module = match[1];
|
||||||
result.file = icon.slice(index + 1);
|
result.file = match[2];
|
||||||
} else {
|
} else {
|
||||||
result.file = icon;
|
result.file = icon;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user