Skip to content

Commit

Permalink
Merge pull request #24 from firstandthird/fixRapptor
Browse files Browse the repository at this point in the history
Fix rapptor
  • Loading branch information
orthagonal committed Nov 30, 2017
2 parents 7b32c34 + 9331822 commit 5d5c9c8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ module.exports = async (server, config, log, requireCwd) => {
pluginArr.push(value);
});
pluginArr = _.sortBy(pluginArr, '_priority');
pluginArr.forEach(async (plugin) => {
for (let i = 0; i < pluginArr.length; i++) {
const plugin = pluginArr[i];
const name = plugin._name;
delete plugin._name;
delete plugin._enabled;
delete plugin._priority;
log(['hapi-confi'], { message: 'plugin loaded', plugin: name, options: plugin });
await server.register({
plugin: requireCwd(name),
options: plugin
});
});
log(['hapi-confi'], { message: 'plugin loaded', plugin: name, options: plugin });
}
};

0 comments on commit 5d5c9c8

Please sign in to comment.