Skip to content

Commit 87ddebd

Browse files
authored
Merge pull request #537 from graingert/patch-1
pass `this` to setup. Fixes #536
2 parents 2f02d0c + ddb2b1f commit 87ddebd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ function Server(compiler, options) {
254254

255255
setup: function() {
256256
if(typeof options.setup === "function")
257-
options.setup(app);
258-
}
257+
options.setup(app, this);
258+
}.bind(this)
259259
};
260260

261261
var defaultFeatures = ["setup", "headers", "middleware"];

0 commit comments

Comments
 (0)