Process event updates even if no events have been returned, so that the view
authorJan Schneider <jan@horde.org>
Wed, 8 Apr 2009 21:38:36 +0000 (23:38 +0200)
committerJan Schneider <jan@horde.org>
Wed, 8 Apr 2009 21:41:11 +0000 (23:41 +0200)
is correctly cleared.

kronolith/js/src/kronolith.js

index a760777..e7a6c0e 100644 (file)
@@ -694,16 +694,14 @@ KronolithCore = {
             dates = [start, end];
 
         this._storeCache(r.response.events || {}, r.response.cal, dates);
-        if (r.response.events) {
-            // Check if this is the still the result of the most current
-            // request.
-            if (r.response.view != this.view ||
-                r.response.sig != this.eventsLoading[r.response.cal]) {
-                return;
-            }
 
-            this._insertEvents(dates, this.view, r.response.cal);
+        // Check if this is the still the result of the most current request.
+        if (r.response.view != this.view ||
+            r.response.sig != this.eventsLoading[r.response.cal]) {
+            return;
         }
+
+        this._insertEvents(dates, this.view, r.response.cal);
     },
 
     /**