Browse Source

[PALEMOON] Fix for loops in DownloadsCommon.jsm and WindowsPreviewPerTab.jsm

(SyntaxError: missing ] after element list)
pull/1/head
NTD 4 years ago committed by Roy Tam
parent
commit
1344bfe691
  1. 16
      application/palemoon/components/downloads/DownloadsCommon.jsm
  2. 9
      application/palemoon/modules/WindowsPreviewPerTab.jsm

16
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)

9
application/palemoon/modules/WindowsPreviewPerTab.jsm

@ -510,7 +510,14 @@ TabWindow.prototype = {
// Previews are internally stored using a map, so we need to iterate over
// the tabbrowser's array of tabs to retrieve previews in the same order.
let inorder = [previews.get(t) for (t of tabs) if (previews.has(t))];
// Tycho: let inorder = [previews.get(t) for (t of tabs) if (previews.has(t))];
let inorder = [];
for (let t of tabs) {
if (previews.has(t)) {
inorder.push(previews.get(t));
}
}
// Since the internal taskbar array has not yet been updated, we must force
// the sorting order of our local array on it. To do so, we must walk

Loading…
Cancel
Save