aboutsummaryrefslogtreecommitdiffstats
path: root/src/web
diff options
context:
space:
mode:
Diffstat (limited to 'src/web')
-rw-r--r--src/web/src/components/Transfers/TransferGroup.jsx32
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) => {