Skip to content

Commit 287e589

Browse files
committed
fix: make options more compatibility
1 parent 1015cea commit 287e589

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/application.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,14 @@ module.exports = class Application extends Emitter {
4444
*
4545
*/
4646

47-
constructor(options = {}) {
47+
constructor(options) {
4848
super();
49+
options = options || {};
4950
this.proxy = options.proxy || false;
50-
this.middleware = [];
5151
this.subdomainOffset = options.subdomainOffset || 2;
5252
this.env = options.env || process.env.NODE_ENV || 'development';
53-
this.keys = options.keys || undefined;
53+
if (options.keys) this.keys = options.keys;
54+
this.middleware = [];
5455
this.context = Object.create(context);
5556
this.request = Object.create(request);
5657
this.response = Object.create(response);

0 commit comments

Comments
 (0)