mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-22 21:29:14 +00:00
sort by internal so first ones are internal and plugins last
This commit is contained in:
parent
930aa72bc6
commit
6d4d904825
@ -104,6 +104,17 @@ Plugins.prototype.getPluginsProperty = function(pluginType, property, sub_proper
|
|||||||
return plugin.has(pluginType);
|
return plugin.has(pluginType);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Sort internal plugins first
|
||||||
|
matchingPlugins.sort((a, b) => {
|
||||||
|
if (a.isInternal) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (b.isInternal) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
|
||||||
let matchingProperties = matchingPlugins.map((plugin) => {
|
let matchingProperties = matchingPlugins.map((plugin) => {
|
||||||
if (sub_property) {
|
if (sub_property) {
|
||||||
return plugin[property][sub_property];
|
return plugin[property][sub_property];
|
||||||
@ -111,6 +122,7 @@ Plugins.prototype.getPluginsProperty = function(pluginType, property, sub_proper
|
|||||||
return plugin[property];
|
return plugin[property];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Remove empty properties
|
||||||
matchingProperties = matchingProperties.filter((property) => property);
|
matchingProperties = matchingProperties.filter((property) => property);
|
||||||
|
|
||||||
//return flattened list
|
//return flattened list
|
||||||
|
Loading…
x
Reference in New Issue
Block a user