Bug 1608610 - Fix 'msgHeaderView element is null' error. r=Fallen
authorPaul Morris <paul@thunderbird.net>
Mon, 13 Jan 2020 17:01:58 -0500
changeset 37229 4656ef92d6aabef50c2a0529ffaceddf9c72c257
parent 37228 0fe3458c274cb2503e2851b64a1bb6b5cac2d480
child 37230 873146a4a36cad063e72cdb17fba63021953f94f
push id2552
push userclokep@gmail.com
push dateMon, 10 Feb 2020 21:24:16 +0000
treeherdercomm-beta@f95a6f4408a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersFallen
bugs1608610
Bug 1608610 - Fix 'msgHeaderView element is null' error. r=Fallen
calendar/lightning/content/imip-bar.js
--- a/calendar/lightning/content/imip-bar.js
+++ b/calendar/lightning/content/imip-bar.js
@@ -530,14 +530,17 @@ var ltnImipBar = {
         aParticipantStatus,
         response
       );
     }
     return false;
   },
 };
 
-if (document.getElementById("msgHeaderView").loaded) {
-  ltnImipBar.load();
-} else {
-  addEventListener("messagepane-loaded", ltnImipBar.load, true);
+{
+  let msgHeaderView = document.getElementById("msgHeaderView");
+  if (msgHeaderView && msgHeaderView.loaded) {
+    ltnImipBar.load();
+  } else {
+    addEventListener("messagepane-loaded", ltnImipBar.load, true);
+  }
 }
 addEventListener("messagepane-unloaded", ltnImipBar.unload, true);