From: Jan Schneider Date: Mon, 31 Jan 2011 17:25:59 +0000 (+0100) Subject: Avoid infinite loop during error condition. Set date before loading events. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=7b103f76151e852058c7b2ecce5d3ab03e4c8e83;p=horde.git Avoid infinite loop during error condition. Set date before loading events. --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index 90080ed3c..0f3376f0c 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -368,6 +368,7 @@ KronolithCore = { this.addHistory(fullloc); this.view = loc; + this.date = date; this.updateView(date, loc); var dates = this.viewDates(date, loc); this.loadEvents(dates[0], dates[1], loc); @@ -391,7 +392,6 @@ KronolithCore = { }); $('kronolithLoading' + loc).insert($('kronolithLoading').remove()); this.updateMinical(date, loc); - this.date = date; break; @@ -1542,7 +1542,10 @@ KronolithCore = { while (!day.isAfter(dates[1])) { // Skip if somehow events slipped in though the view is gone. if (!day.between(viewDates[0], viewDates[1])) { - console.log(day, this.dates); + if (window.console) { + window.console.trace(); + } + day.next().day(); continue; }