Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: compatible with onAfterSetupMiddleware
  • Loading branch information
godky committed 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
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.