Bug 670976 - aFolder is undefined - in folderWidgets.xml. r=bienvenu
--- 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