Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

pass the error to the callback when trying to load additional plugins… #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions architect.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,20 +527,24 @@ function Architect(config) {
callback(null, app);
}); // What about error state?

// Check the config - hopefully this works
var _sortedPlugins = checkConfig(additionalConfig, function(name){
return services[name];
});

if (ready) {
sortedPlugins = _sortedPlugins;
// Start Loading additional plugins
startPlugins(true);
}
else {
_sortedPlugins.forEach(function(item){
sortedPlugins.push(item);
try {
// Check the config - hopefully this works
var _sortedPlugins = checkConfig(additionalConfig, function(name){
return services[name];
});

if (ready) {
sortedPlugins = _sortedPlugins;
// Start Loading additional plugins
startPlugins(true);
}
else {
_sortedPlugins.forEach(function(item){
sortedPlugins.push(item);
});
}
} catch (err) {
callback(err, null);
}
});
}
Expand Down