summaryrefslogtreecommitdiffstats
path: root/application/palemoon/components/downloads
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-04-07 12:33:16 -0400
committerMatt A. Tobin <email@mattatobin.com>2018-04-07 12:33:16 -0400
commit45f3d2bf068f90b8a397bbada9b07dda7c831647 (patch)
treece09240fc4f06a3dc3c8dfed063144cd58b38dc5 /application/palemoon/components/downloads
parent03cf69df453c7d4e188259e4bfb7317e8e993a33 (diff)
downloadUXP-45f3d2bf068f90b8a397bbada9b07dda7c831647.tar
UXP-45f3d2bf068f90b8a397bbada9b07dda7c831647.tar.gz
UXP-45f3d2bf068f90b8a397bbada9b07dda7c831647.tar.lz
UXP-45f3d2bf068f90b8a397bbada9b07dda7c831647.tar.xz
UXP-45f3d2bf068f90b8a397bbada9b07dda7c831647.zip
[PALEMOON] Fix for loops in DownloadsCommon.jsm and WindowsPreviewPerTab.jsm
(SyntaxError: missing ] after element list)
Diffstat (limited to 'application/palemoon/components/downloads')
-rw-r--r--application/palemoon/components/downloads/DownloadsCommon.jsm16
1 files changed, 13 insertions, 3 deletions
diff --git a/application/palemoon/components/downloads/DownloadsCommon.jsm b/application/palemoon/components/downloads/DownloadsCommon.jsm
index b90baaf9c..0921f8400 100644
--- a/application/palemoon/components/downloads/DownloadsCommon.jsm
+++ b/application/palemoon/components/downloads/DownloadsCommon.jsm
@@ -867,9 +867,19 @@ DownloadsDataCtor.prototype = {
// Sort backwards by start time, ensuring that the most recent
// downloads are added first regardless of their state.
- let loadedItemsArray = [dataItem
- for each (dataItem in this.dataItems)
- if (dataItem)];
+ // Tycho:
+ //let loadedItemsArray = [dataItem
+ // for each (dataItem in this.dataItems)
+ // if (dataItem)];
+
+ let loadedItemsArray = [];
+
+ for each (let dataItem in this.dataItems) {
+ if (dataItem) {
+ loadedItemsArray.push(dataItem);
+ }
+ }
+
loadedItemsArray.sort(function(a, b) b.startTime - a.startTime);
loadedItemsArray.forEach(
function (dataItem) aView.onDataItemAdded(dataItem, false)