summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorNew Tobin Paradigm <email@mattatobin.com>2018-04-13 21:54:07 -0400
committerGitHub <noreply@github.com>2018-04-13 21:54:07 -0400
commit99ba894a9a5f6204dec20f17d5c7fe5d3a869b95 (patch)
tree9556e4b063058c2cdf819dda6d9ea32281719099 /application
parent8437051001314731d8f19610061eba318204cb32 (diff)
parentfacac9b21fd86270386a2d2e61229a9cde3e331d (diff)
downloadUXP-99ba894a9a5f6204dec20f17d5c7fe5d3a869b95.tar
UXP-99ba894a9a5f6204dec20f17d5c7fe5d3a869b95.tar.gz
UXP-99ba894a9a5f6204dec20f17d5c7fe5d3a869b95.tar.lz
UXP-99ba894a9a5f6204dec20f17d5c7fe5d3a869b95.tar.xz
UXP-99ba894a9a5f6204dec20f17d5c7fe5d3a869b95.zip
Merge pull request #154 from janekptacijarabaci/pm_places_downloads_1
Fix: TypeError: "this._richlistbox.selectedItems.slice is not a function" in allDownloadsViewOverlay.js
Diffstat (limited to 'application')
-rw-r--r--application/palemoon/components/downloads/content/allDownloadsViewOverlay.js10
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);
}