Skip to content

Commit

Permalink
Fix failing require with webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDegraeve committed Nov 14, 2014
1 parent d272691 commit 874b742
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/adapters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,13 @@ adapters = new (function () {

this.create = function (name, config) {
var info = this.getAdapterInfo(name)
, ctorPath
, ctor;

if (!info) {
throw new Error('"' + name + '" is not a valid adapter.');
}

ctorPath = path.join(__dirname, info.path)
ctor = require(ctorPath).Adapter;
ctor = require('./' + info.path).Adapter;

return new ctor(config || {});
};
Expand Down

0 comments on commit 874b742

Please sign in to comment.