Skip to content

Commit

Permalink
Fix content download request removal for MyDownloads page.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtibbles committed Oct 13, 2023
1 parent dd3e24f commit 40acc47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,10 @@
}
},
markSingleResourceForRemoval(download) {
this.resourcesToDelete.push(download);
this.resourcesToDelete.push(download.contentnode_id);
},
removeSelectedResources() {
this.resourcesToDelete = this.downloads.filter(download =>
Boolean(this.selectedDownloadsMap[download.contentnode_id])
);
this.resourcesToDelete = Object.keys(this.selectedDownloadsMap);
},
emitCurrentlySelectedResourcesForRemoval() {
this.$emit('removeResources', this.resourcesToDelete);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@
return bytesForHumans(0);
}
},
removeResources(resources) {
for (const resource of resources) {
this.removeDownloadRequest(resource);
removeResources(contentNodeIds) {
for (const contentNodeId of contentNodeIds) {
this.removeDownloadRequest(contentNodeId);
}
},
},
Expand Down

0 comments on commit 40acc47

Please sign in to comment.