Skip to content

Commit

Permalink
Fix IE8. It does not have window.addEventListener
Browse files Browse the repository at this point in the history
  • Loading branch information
n1mmy committed May 11, 2013
1 parent 8c99176 commit e0573b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/livedata/stream_client_sockjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ Meteor._DdpClientStream = function (url) {

self.heartbeatTimer = null;

//// Listen to global 'online' event
if (typeof window !== 'undefined') // if we are running in a browser
// Listen to global 'online' event if we are running in a browser.
// (IE8 does not support addEventListener)
if (typeof window !== 'undefined' && window.addEventListener)
window.addEventListener("online", _.bind(self._online, self));

//// Kickoff!
Expand Down

0 comments on commit e0573b6

Please sign in to comment.