Bug 1195480 - Enable custom columns for secondary sort, persist and restore all column primary and secondary sort states - fix tests. r=mkmelin, a=rkent
authoralta88
Sun, 20 Sep 2015 18:00:13 -0600
changeset 26440 4829f1271bde671b89344e9b310082855d52392e
parent 26439 ca799fe0e2fe43986114debfe5889d5552a9673c
child 26441 21eeb3aa2f963dad9659d89059fb48353090c5e1
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin, rkent
bugs1195480
Bug 1195480 - Enable custom columns for secondary sort, persist and restore all column primary and secondary sort states - fix tests. r=mkmelin, a=rkent
mail/base/content/folderDisplay.js
--- a/mail/base/content/folderDisplay.js
+++ b/mail/base/content/folderDisplay.js
@@ -355,17 +355,17 @@ FolderDisplayWidget.prototype = {
     return this.selectedCount != 0;
   },
 
   /**
    * Restore the last expandAll/collapseAll state, for both grouped and threaded
    * views. Not all views respect viewFlags, ie single folder non-virtual.
    */
   restoreThreadState: function() {
-    if (!this._active)
+    if (!this._active || !this.tree)
       return;
 
     if (this.view._threadExpandAll &&
         !(this.view.dbView.viewFlags & nsMsgViewFlagsType.kExpandAll))
       this.view.dbView.doCommand(Components.interfaces.nsMsgViewCommandType.expandAll);
     if (!this.view._threadExpandAll &&
         this.view.dbView.viewFlags & nsMsgViewFlagsType.kExpandAll)
       this.view.dbView.doCommand(Components.interfaces.nsMsgViewCommandType.collapseAll);