From 07fba274b1d5da40b0fbe58263d6c3dc5ed6fa6e Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Fri, 9 Jan 2015 12:43:45 +0100 Subject: [PATCH 1/2] module var fix --- lib/websocket.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/websocket.js b/lib/websocket.js index ddb44aed5d..5b40075e43 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; From c9015e2e04729a06cbcfd650ebfb0c1e71d96ce3 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Fri, 9 Jan 2015 12:44:11 +0100 Subject: [PATCH 2/2] module var fix --- lib/web3.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/web3.js b/lib/web3.js index b240bdae27..9a85c4d1bd 100644 --- a/lib/web3.js +++ b/lib/web3.js @@ -505,4 +505,5 @@ function messageHandler(data) { } } -module.exports = web3; +if (typeof(module) !== "undefined") + module.exports = web3;