diff --git a/lib/web3.js b/lib/web3.js index b240bdae2..9a85c4d1b 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;