Permalink
Browse files

Merge branch 'fix-jquery-ajax-when-data-undefined' of git://github.co…

…m/emb/bullet
  • Loading branch information...
essen committed Aug 10, 2013
2 parents 2a5b7bf + cc6aa9a commit d907d982d7ac694facab641056880e2ed1c5d2f7
Showing with 2 additions and 2 deletions.
  1. +2 −2 priv/bullet.js
View
@@ -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){

0 comments on commit d907d98

Please sign in to comment.