Skip to content

Commit

Permalink
fix: fix fastify contructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Snazzah committed Sep 5, 2024
1 parent 5768f95 commit 2248208
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/servers/fastify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ export class FastifyServer extends Server {
super(opts);
try {
const fastify = require('fastify');
const symbols = require('fastify/lib/symbols');
if (!app) {
app = fastify.default();
} else if (!(symbols.kState in app)) {
} else if (!('initialConfig' in app)) {
app = fastify.default(app);
}
} catch (e) {
Expand Down

0 comments on commit 2248208

Please sign in to comment.