Skip to content

Commit

Permalink
fix: compatible with onAfterSetupMiddleware
Browse files Browse the repository at this point in the history
  • Loading branch information
godky authored Dec 29, 2021
1 parent 317e4b9 commit f6bc644
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2375,10 +2375,6 @@ class Server {
});
}

if (typeof this.options.onAfterSetupMiddleware === "function") {
this.options.onAfterSetupMiddleware(this);
}

if (typeof this.options.setupMiddlewares === "function") {
middlewares = this.options.setupMiddlewares(middlewares, this);
}
Expand All @@ -2395,6 +2391,10 @@ class Server {
(this.app).use(middleware.middleware);
}
});

if (typeof this.options.onAfterSetupMiddleware === "function") {
this.options.onAfterSetupMiddleware(this);
}
}

/**
Expand Down

0 comments on commit f6bc644

Please sign in to comment.