Permalink
Browse files

ie8 fix

ie8 doesn't have Array#forEach
  • Loading branch information...
1 parent 504c0af commit c4c41a25508b4b07c1b021273368cb7a75086c26 @juliangruber juliangruber committed Mar 11, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 browser.js
View
8 browser.js
@@ -47,11 +47,11 @@ module.exports = function (uri, cb) {
sock.onopen = function () {
if (typeof cb === 'function') cb();
ready = true;
- buffer.forEach(function (msg) {
- sock.send(msg);
- });
+ for (var i = 0; i < buffer.length; i++) {
+ sock.send(buffer[i]);
+ }
buffer = [];
- stream.emit('connect')
+ stream.emit('connect');
if (stream._ended) stream.end();
};

0 comments on commit c4c41a2

Please sign in to comment.