Bug 670976 - aFolder is undefined - in folderWidgets.xml. r=bienvenu
authoraceman <acelists@atlas.sk>
Tue, 21 Feb 2012 13:27:42 +0000
changeset 10885 61302b6893270b2bbfb7bf15865a10e8416331d1
parent 10884 5d709315385852799b18874c552a7c117b2d8c7a
child 10886 08ff06f0d7a8dd2756c4e99f8e49c3b460b0038e
push id463
push userbugzilla@standard8.plus.com
push dateTue, 24 Apr 2012 17:34:51 +0000
treeherdercomm-beta@e53588e8f7b0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbienvenu
bugs670976
Bug 670976 - aFolder is undefined - in folderWidgets.xml. r=bienvenu
mailnews/base/content/folderWidgets.xml
--- a/mailnews/base/content/folderWidgets.xml
+++ b/mailnews/base/content/folderWidgets.xml
@@ -234,31 +234,31 @@
           setTimeout(this._clearMenu, 0, this._menu);
         },
 
         /**
          * Helper function to check and see whether we have a menuitem for this
          * particular nsIMsgFolder
          *
          * @param aItem  the nsIMsgFolder to check
-         * @param aMenu (optional) menu to look in, defaults to this._menu.
+         * @param aMenu  (optional) menu to look in, defaults to this._menu.
          * @returns      null if no child for that folder exists, otherwise the
-         *              menuitem for that child
+         *               menuitem for that child
          */
         _getChildForItem: function act__itemIsChild(aItem, aMenu) {
           aMenu = aMenu || this._menu;
           if (!aMenu || !aMenu.childNodes)
             return null;
 
            if (!(aItem instanceof Components.interfaces.nsIMsgFolder))
              return null;
-           for (var i = 0; i < aMenu.childNodes.length; i++) {
-             var folder = aMenu.childNodes[i]._folder;
+           for (let i = 0; i < aMenu.childNodes.length; i++) {
+             let folder = aMenu.childNodes[i]._folder;
              if (folder && folder.URI == aItem.URI)
-               return aItem;
+               return aMenu.childNodes[i];
            }
            return null;
         }
       })]]></field>
 
       <!-- 
          - True if we have already built our menu-items and are now just
          - listening for changes