diff options
-rw-r--r-- | priv/bullet.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/priv/bullet.js b/priv/bullet.js index 7cc9fb5..26a1fc5 100644 --- a/priv/bullet.js +++ b/priv/bullet.js @@ -59,7 +59,7 @@ contentType: 'application/x-www-form-urlencoded; charset=utf-8', headers: {'X-Socket-Transport': 'xhrPolling'}, success: function(data){ - if (data.length !== 0){ + if (data && data.length !== 0){ self.onmessage({'data': data}); } } @@ -181,7 +181,7 @@ fake.onopen(fake); } // Connection might have closed without a response body - if (data.length !== 0){ + if (data && data.length !== 0){ fake.onmessage({'data': data}); } if (fake.readyState == OPEN){ |