diff options
Diffstat (limited to 'lib/websocket.js')
-rw-r--r-- | lib/websocket.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/websocket.js b/lib/websocket.js index ddb44aed5..5b40075e4 100644 --- a/lib/websocket.js +++ b/lib/websocket.js @@ -74,4 +74,5 @@ Object.defineProperty(WebSocketProvider.prototype, "onmessage", { set: function(provider) { this.onMessage(provider); } }); -module.exports = WebSocketProvider; +if (typeof(module) !== "undefined") + module.exports = WebSocketProvider; |