check container is defined draft
authorISHIKAWA, Chiaki <ishikawa@yk.rim.or.jp>
Mon, 23 May 2022 03:03:50 +0900
changeset 116811 3099cc19d372d973e9a1624a0c2a987498dd9ce3
parent 116810 e30573d6c2d9bd51ba8d968edb9f6e837130b8f7
child 116812 bffa8dc807bd07371d20185f0363cbc0edad8c5d
push id15955
push userishikawa@yk.rim.or.jp
push dateSun, 22 May 2022 18:04:18 +0000
treeherdertry-comm-central@beaacca97fbd [default view] [failures only]
check container is defined
mail/components/customizableui/content/panelUI.js
--- a/mail/components/customizableui/content/panelUI.js
+++ b/mail/components/customizableui/content/panelUI.js
@@ -1128,18 +1128,24 @@ var gExtensionsNotifications = {
     let sideloaded = ExtensionsUI.sideloaded;
     let updates = ExtensionsUI.updates;
     let bundle = Services.strings.createBundle(
       "chrome://messenger/locale/addons.properties"
     );
 
     let container = PanelUI.addonNotificationContainer;
 
-    while (container.firstChild) {
-      container.firstChild.remove();
+    if (container) {
+      while (container.firstChild) {
+        container.firstChild.remove();
+      }
+    } else {
+        console.log("container (PanelUI.addonNotificationContainer) was null in updateAlerts\n");
+        console.log("PanelUI was:");
+        console.dir(PanelUI);
     }
 
     let items = 0;
     for (let update of updates) {
       if (++items > 4) {
         break;
       }
       let text = bundle.formatStringFromName("webextPerms.updateMenuItem", [