Commits

rechardchen committed 58e05e1

bug fix for browser runtime

Comments (0)

Files changed (1)

 (function(exports){
+    var io;
+
     if('object' == typeof module && 'function' == typeof require)
-        var io = require('socket.io-client');
+        io = require('socket.io-client');
+    else
+        io = exports.io;   //require socket.io-client in browser
+
     function EventEmitter(){  //TODO: use sea.js to manage depencies
         this._events = {};
     }