We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 40902a1 commit 85b630eCopy full SHA for 85b630e
1 file changed
lib/index.ts
@@ -156,9 +156,7 @@ export class Server<
156
this.adapter(opts.adapter || Adapter);
157
this.sockets = this.of("/");
158
this.opts = opts;
159
- if (srv instanceof http.Server || typeof srv === "number") {
160
- this.attach(srv);
161
- }
+ if (srv || typeof srv == "number") this.attach(srv as http.Server | number);
162
}
163
164
/**
0 commit comments