diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/web/src/components/Transfers/TransferGroup.jsx | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/web/src/components/Transfers/TransferGroup.jsx b/src/web/src/components/Transfers/TransferGroup.jsx index ea4fba04..f150459a 100644 --- a/src/web/src/components/Transfers/TransferGroup.jsx +++ b/src/web/src/components/Transfers/TransferGroup.jsx @@ -65,21 +65,29 @@ class TransferGroup extends Component { }; cancelAll = async (direction, username, selected) => { - await Promise.all( - selected.map((file) => - transfers.cancel({ direction, id: file.id, username }), - ), - ); + try { + await Promise.all( + selected.map((file) => + transfers.cancel({ direction, id: file.id, username }), + ), + ); + } catch (error) { + console.error(error); + } }; removeAll = async (direction, username, selected) => { - await Promise.all( - selected.map((file) => - transfers - .cancel({ direction, id: file.id, remove: true, username }) - .then(() => this.removeFileSelection(file)), - ), - ); + try { + await Promise.all( + selected.map((file) => + transfers + .cancel({ direction, id: file.id, remove: true, username }) + .then(() => this.removeFileSelection(file)), + ), + ); + } catch (error) { + console.error(error); + } }; handleRetry = async (file) => { |
