Bug 1581909 - Use existing item recurrence info instead of overwriting it; r=pmorris
☠☠ backed out by 2148bb88117e ☠ ☠
authorGeoff Lankow <geoff@darktrojan.net>
Thu, 19 Sep 2019 20:40:51 +1200
changeset 36859 d52c5f0981525fe1b66bc0f450ce4d667fb22b15
parent 36858 95aa8237c44ec527e591effa0f3857b0c2a0b29e
child 36860 2fd4b75c695082f82642c58d06948f11784d552d
push id395
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:38:57 +0000
reviewerspmorris
bugs1581909
Bug 1581909 - Use existing item recurrence info instead of overwriting it; r=pmorris
calendar/providers/storage/calStorageCalendar.js
--- a/calendar/providers/storage/calStorageCalendar.js
+++ b/calendar/providers/storage/calStorageCalendar.js
@@ -1727,19 +1727,21 @@ calStorageCalendar.prototype = {
 
     this.prepareStatement(this.mSelectAllRecurrences);
     await this.executeAsync(this.mSelectAllRecurrences, row => {
       let item = itemsMap.get(row.getResultByName("item_id"));
       if (!item) {
         return;
       }
 
-      let recInfo = cal.createRecurrenceInfo(item);
-      item.recurrenceInfo = recInfo;
+      if (!item.recurrenceInfo) {
+        item.recurrenceInfo = cal.createRecurrenceInfo(item);
+      }
 
+      let recInfo = item.recurrenceInfo;
       let ritem = this.getRecurrenceItemFromRow(row);
       recInfo.appendRecurrenceItem(ritem);
     });
 
     this.prepareStatement(this.mSelectAllEventExceptions);
     await this.executeAsync(this.mSelectAllEventExceptions, async row => {
       let item = itemsMap.get(row.getResultByName("id"));
       if (!item) {