mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 13:07:52 +00:00
Bug 1116769 - Use for each ... in instead of for ... of in webapprt downloads.js. r=myk
This commit is contained in:
parent
579783f725
commit
2353e2416e
@ -727,7 +727,7 @@ let gDownloadList = {
|
||||
this.downloadView.parentNode.replaceChild(empty, this.downloadView);
|
||||
this.downloadView = empty;
|
||||
|
||||
for (let downloadItem of this.downloadItems) {
|
||||
for each (let downloadItem in this.downloadItems) {
|
||||
if (downloadItem.inProgress ||
|
||||
downloadItem.matchesSearch(this.searchTerms, this.searchAttributes)) {
|
||||
this.downloadView.appendChild(downloadItem.element);
|
||||
@ -773,7 +773,7 @@ let gDownloadList = {
|
||||
let button = document.getElementById("clearListButton");
|
||||
|
||||
// The button is enabled if we have items in the list that we can clean up.
|
||||
for (let downloadItem of this.downloadItems) {
|
||||
for each (let downloadItem in this.downloadItems) {
|
||||
if (!downloadItem.inProgress &&
|
||||
downloadItem.matchesSearch(this.searchTerms, this.searchAttributes)) {
|
||||
button.disabled = false;
|
||||
@ -983,7 +983,7 @@ let gDownloadList = {
|
||||
let totalSize = 0;
|
||||
let totalTransferred = 0;
|
||||
|
||||
for (let downloadItem of this.downloadItems) {
|
||||
for each (let downloadItem in this.downloadItems) {
|
||||
if (!downloadItem.inProgress) {
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user