Browse code

[Calendar] BM-15431 Fix: check if attendee dir is null before using it

kladier authored on 29/11/2019 10:57:53
Showing 1 changed files
... ...
@@ -434,7 +434,7 @@ net.bluemind.calendar.vevent.VEventPresenter.prototype.freeBusyRequest = functio
434 434
   var promise;
435 435
   var exclusions = opt_excludeThisEvent && this.ctx.params.get('uid') != null ? [ this.ctx.params.get('uid') ] : [];
436 436
 
437
-  var isKnownByBM = goog.string.startsWith(attendee['dir'], 'bm://');
437
+  var isKnownByBM = attendee['dir'] != null && goog.string.startsWith(attendee['dir'], 'bm://'); 
438 438
   var dirEntryKind = isKnownByBM ? attendee['dir'].substring('bm://'.length).split("/")[1] : null;
439 439
 
440 440
   var containerBasedFreebusy = dirEntryKind == "users" || dirEntryKind == "resources";