mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-20 14:17:30 +09:00
Fix: TypeError: "this._richlistbox.selectedItems.slice is not a function" in allDownloadsViewOverlay.js
Issue #121
This commit is contained in:
parent
1f560c7d2f
commit
65356126cc
1 changed files with 5 additions and 5 deletions
|
|
@ -1476,11 +1476,11 @@ DownloadsPlacesView.prototype = {
|
||||||
goUpdateCommand("downloadsCmd_clearDownloads");
|
goUpdateCommand("downloadsCmd_clearDownloads");
|
||||||
break;
|
break;
|
||||||
default: {
|
default: {
|
||||||
// Slicing the array to get a freezed list of selected items. Otherwise,
|
// Cloning the nodelist into an array to get a frozen list of selected items.
|
||||||
// the selectedItems array is live and doCommand may alter the selection
|
// Otherwise, the selectedItems nodelist is live and doCommand may alter the
|
||||||
// while we are trying to do one particular action, like removing items
|
// selection while we are trying to do one particular action, like removing
|
||||||
// from history.
|
// items from history.
|
||||||
let selectedElements = this._richlistbox.selectedItems.slice();
|
let selectedElements = [...this._richlistbox.selectedItems];
|
||||||
for (let element of selectedElements) {
|
for (let element of selectedElements) {
|
||||||
element._shell.doCommand(aCommand);
|
element._shell.doCommand(aCommand);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue