mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
bug 94590, remove dup entries from wallet preview dialog, r=law, sr=alecf
This commit is contained in:
parent
7fb75487be
commit
a3cdd91c11
@ -56,7 +56,20 @@ function Startup() {
|
||||
menuItem.setAttribute("selected", "true");
|
||||
}
|
||||
menuItem.setAttribute("label", prefillList[i+2]);
|
||||
menuPopup.appendChild(menuItem);
|
||||
|
||||
/* avoid making duplicate entries in the same menulist */
|
||||
var child = menuPopup.firstChild;
|
||||
var alreadyThere = false;
|
||||
while (child) {
|
||||
if (child.getAttribute("label") == prefillList[i+2]) {
|
||||
alreadyThere = true;
|
||||
break;
|
||||
}
|
||||
child = child.nextSibling;
|
||||
}
|
||||
if (!alreadyThere) {
|
||||
menuPopup.appendChild(menuItem);
|
||||
}
|
||||
|
||||
if(count == 0) {
|
||||
var menuList = document.createElement("menulist");
|
||||
|
Loading…
Reference in New Issue
Block a user