Skip to content

Commit

Permalink
fix: Cannot read property 'headers' of null at Server.socket.on
Browse files Browse the repository at this point in the history
  • Loading branch information
wood1986 committed Aug 16, 2019
1 parent 2d44ef8 commit 1d05d6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/servers/SockJSServer.js
Original file line number Diff line number Diff line change
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 1d05d6c

Please sign in to comment.