Skip to content

Commit 043b55c

Browse files
refactor(sio): simplify middleware execution (bis)
1 parent 32c761f commit 043b55c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/socket.io/lib/namespace.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export class Namespace<
222222
socket: Socket<ListenEvents, EmitEvents, ServerSideEvents, SocketData>,
223223
fn: (err?: ExtendedError) => void,
224224
) {
225-
if (!this._fns) return fn();
225+
if (!this._fns.length) return fn();
226226

227227
const fns = this._fns.slice(0);
228228

0 commit comments

Comments
 (0)