Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Return null from ws.create() if the browser does not support WebSocke…
…t. This prevents crashes in IE <10.
  • Loading branch information
jcoglan committed Jul 29, 2016
1 parent b3cb856 commit c647be9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/util/websocket/browser_websocket.js
Expand Up @@ -4,6 +4,7 @@ var WS = global.MozWebSocket || global.WebSocket;

module.exports = {
create: function(url, protocols, options) {
if (typeof WS !== 'function') return null;
return new WS(url);
}
};

0 comments on commit c647be9

Please sign in to comment.