summaryrefslogtreecommitdiffstats
path: root/core/js/eventsource.js
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-02-14 12:17:14 +0100
committerThomas Mueller <thomas.mueller@tmit.eu>2013-02-14 12:20:22 +0100
commit8065c73339fe624a2b833cbb283887d4e2e58bdf (patch)
tree8e0bec822f97f82efc1fa91fb79332aad194f8c1 /core/js/eventsource.js
parent8877087b5716fde078bab4d303240498f02dd48b (diff)
downloadnextcloud-server-8065c73339fe624a2b833cbb283887d4e2e58bdf.tar.gz
nextcloud-server-8065c73339fe624a2b833cbb283887d4e2e58bdf.zip
fixing eventsource.js for IE8
Diffstat (limited to 'core/js/eventsource.js')
-rw-r--r--core/js/eventsource.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/js/eventsource.js b/core/js/eventsource.js
index f783ade7ae9..ce8c8387c8e 100644
--- a/core/js/eventsource.js
+++ b/core/js/eventsource.js
@@ -87,8 +87,10 @@ OC.EventSource.prototype={
useFallBack:false,
fallBackCallBack:function(type,data){
if(type){
- for(var i=0;i<this.listeners[type].length;i++){
- this.listeners[type][i](data);
+ if (typeof this.listeners['done'] != 'undefined') {
+ for(var i=0;i<this.listeners[type].length;i++){
+ this.listeners[type][i](data);
+ }
}
}else{
for(var i=0;i<this.typelessListeners.length;i++){
@@ -117,6 +119,8 @@ OC.EventSource.prototype={
}
},
close:function(){
- this.source.close();
+ if (typeof this.source !='undefined') {
+ this.source.close();
+ }
}
}