aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/eventsource.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/eventsource.js')
-rw-r--r--core/js/eventsource.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/js/eventsource.js b/core/js/eventsource.js
index ce8c8387c8e..536b180bc8f 100644
--- a/core/js/eventsource.js
+++ b/core/js/eventsource.js
@@ -110,7 +110,11 @@ OC.EventSource.prototype={
this.listeners[type].push(callback);
}else{
this.source.addEventListener(type,function(e){
- callback(JSON.parse(e.data));
+ if (typeof e.data != 'undefined') {
+ callback(JSON.parse(e.data));
+ } else {
+ callback('');
+ }
},false);
}
}else{