From de7b7d3313913150364645d1ed51c569fb37d1da Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Tue, 10 Jan 2023 19:51:14 +0000 Subject: Fix inability to re-enter share password after invalid input Signed-off-by: Christopher Ng --- apps/files_sharing/src/components/SharingEntryLink.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue index 1d9e2b6e211..f75a5647df6 100644 --- a/apps/files_sharing/src/components/SharingEntryLink.vue +++ b/apps/files_sharing/src/components/SharingEntryLink.vue @@ -608,7 +608,13 @@ export default { if (this.share && !this.share.id) { // if the share is valid, create it on the server if (this.checkShare(this.share)) { - await this.pushNewLinkShare(this.share, true) + try { + await this.pushNewLinkShare(this.share, true) + } catch (e) { + this.pending = false + console.error(e) + return false + } return true } else { this.open = true @@ -720,6 +726,7 @@ export default { } else { this.onSyncError('pending', message) } + throw data } finally { this.loading = false } -- cgit v1.2.3