From 7aaa25de74092068d8305b0d1c0354e56a8503e7 Mon Sep 17 00:00:00 2001 From: Muppetteer Date: Mon, 15 Nov 2021 15:55:21 +1100 Subject: Retry button on failed downloads fails with a script error Clicking retry on a failed download does not seem to work at all for me. To reproduce: 1. Search for something to download. 2. Switch to downloads tab and watch it start. 3. Force it to fail somehow. 4. Progress says "Completed, Errored" and the progress bar is 100% red. 5. Select the failed download and press the retry button at bottom of the page. This error is being logged in the browser console. ``` Uncaught (in promise) TypeError: e.map is not a function retryAll TransferGroup.js:54 onClick TransferGroup.js:123 Lodash 4 handleClick Button.js:63 React 12 unstable_runWithPriority scheduler.production.min.js:19 React 3 ``` Looking at it TransferGroup->retryAll function is expecting 1 parameter but it is being called with 3. Only the 3rd parameter should be used (map of selected items). This is untested as I am running slskd in a Docker container and can't work out how to edit the source inside it. --- src/web/src/components/Transfers/TransferGroup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/web') diff --git a/src/web/src/components/Transfers/TransferGroup.js b/src/web/src/components/Transfers/TransferGroup.js index db093303..f2c5263d 100644 --- a/src/web/src/components/Transfers/TransferGroup.js +++ b/src/web/src/components/Transfers/TransferGroup.js @@ -120,7 +120,7 @@ class TransferGroup extends Component { icon='redo' color='green' content={`Retry${all}`} - onClick={() => this.retryAll(direction, user.username, selected)} + onClick={() => this.retryAll(selected)} />} {allRetryable && anyCancellable && } {anyCancellable && @@ -144,4 +144,4 @@ class TransferGroup extends Component { } } -export default TransferGroup; \ No newline at end of file +export default TransferGroup; -- cgit v1.2.3