Skip to content

Commit

Permalink
add null check
Browse files Browse the repository at this point in the history
  • Loading branch information
wood1986 committed Aug 16, 2019
1 parent 2d44ef8 commit d602201
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/servers/SockJSServer.js
Expand Up @@ -64,7 +64,7 @@ module.exports = class SockJSServer extends BaseServer {
// f should be passed the resulting connection and the connection headers
onConnection(f) {
this.socket.on('connection', (connection) => {
f(connection, connection.headers);
f(connection, connection ? connection.headers : null);
});
}

Expand Down

0 comments on commit d602201

Please sign in to comment.