diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-14 03:15:56 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-14 03:15:56 +0200 |
commit | facac9b21fd86270386a2d2e61229a9cde3e331d (patch) | |
tree | 72f19d7be6ceca185cf23343595457d4ad5a90f6 /application/palemoon/components/downloads | |
parent | 386266fab1d56b6ca116271d4670155653fa43ff (diff) | |
download | UXP-facac9b21fd86270386a2d2e61229a9cde3e331d.tar UXP-facac9b21fd86270386a2d2e61229a9cde3e331d.tar.gz UXP-facac9b21fd86270386a2d2e61229a9cde3e331d.tar.lz UXP-facac9b21fd86270386a2d2e61229a9cde3e331d.tar.xz UXP-facac9b21fd86270386a2d2e61229a9cde3e331d.zip |
Fix: TypeError: "this._richlistbox.selectedItems.slice is not a function" in allDownloadsViewOverlay.js
Issue #121
Diffstat (limited to 'application/palemoon/components/downloads')
-rw-r--r-- | application/palemoon/components/downloads/content/allDownloadsViewOverlay.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js b/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js index 9d90b20e1..46e867068 100644 --- a/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js +++ b/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js @@ -1476,11 +1476,11 @@ DownloadsPlacesView.prototype = { goUpdateCommand("downloadsCmd_clearDownloads"); break; default: { - // Slicing the array to get a freezed list of selected items. Otherwise, - // the selectedItems array is live and doCommand may alter the selection - // while we are trying to do one particular action, like removing items - // from history. - let selectedElements = this._richlistbox.selectedItems.slice(); + // Cloning the nodelist into an array to get a frozen list of selected items. + // Otherwise, the selectedItems nodelist is live and doCommand may alter the + // selection while we are trying to do one particular action, like removing + // items from history. + let selectedElements = [...this._richlistbox.selectedItems]; for (let element of selectedElements) { element._shell.doCommand(aCommand); } |