Fix for bug 48994. Take the first identity if we don't have a default one. R=alecf

This commit is contained in:
ducarroz%netscape.com 2000-08-18 00:08:59 +00:00
Родитель 415d5448ff
Коммит 8f033867fd
1 изменённых файлов: 10 добавлений и 5 удалений

Просмотреть файл

@ -571,15 +571,20 @@ function ComposeStartup()
fillIdentityListPopup(identityListPopup);
}
var identity;
var identity = null;
if (args.preselectid)
identity = getIdentityForKey(args.preselectid);
else
{
// no preselect, so use the default account
var identities = accountManager.defaultAccount.identities;
identity = identities.QueryElementAt(0, Components.interfaces.nsIMsgIdentity);
// no preselect, so use the default account
var identities = accountManager.defaultAccount.identities;
if (identities.Count() >= 1)
identity = identities.QueryElementAt(0, Components.interfaces.nsIMsgIdentity);
else
{
var identities = GetIdentities();
identity = identities[0];
}
}
for (i=0;i<identityListPopup.childNodes.length;i++) {