Skip to content

Commit

Permalink
fix(plugins): check for plugin.default
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-ciniawsky committed Oct 27, 2016
1 parent 94e2812 commit 024e8c7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ module.exports = function plugins (config) {
return config[plugin] !== false ? plugin : ''
})
.forEach(function (plugin) {
return plugins.push(load(plugin, config[plugin]))
plugin = load(plugin, config[plugin])

if (plugin.default && typeof plugin.default === 'function') {
plugin = plugin.default
}

return plugins.push(plugin)
})

return plugins
Expand Down

0 comments on commit 024e8c7

Please sign in to comment.