diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-03-03 13:32:29 +0300 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-03-11 11:07:30 +0300 |
commit | 3462444def84d3bbfb4123d42f8b8bbcba981c6f (patch) | |
tree | 936faf78d4fcf80cd03ad13ffa365fdf3d3bc844 /apps/files_sharing/src | |
parent | 6db7731742f1e5f490deb874a0b04e86b3be8642 (diff) |
Only clear share password model when actually saved
Instead of always clearing the password in the share model, now only do
it when it was actually saved.
Fixes an issue where saving another field would clear the password too
early and prevent it to be saved when the dropdown closed.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
Diffstat (limited to 'apps/files_sharing/src')
-rw-r--r-- | apps/files_sharing/src/mixins/SharesMixin.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files_sharing/src/mixins/SharesMixin.js b/apps/files_sharing/src/mixins/SharesMixin.js index aef543a5fc6..4349e10d641 100644 --- a/apps/files_sharing/src/mixins/SharesMixin.js +++ b/apps/files_sharing/src/mixins/SharesMixin.js @@ -248,11 +248,14 @@ export default { try { await this.updateShare(this.share.id, properties) + if (propertyNames.indexOf('password') >= 0) { + // reset password state after sync + this.$delete(this.share, 'newPassword') + } + // clear any previous errors this.$delete(this.errors, propertyNames[0]) - // reset password state after sync - this.$delete(this.share, 'newPassword') } catch ({ message }) { if (message && message !== '') { this.onSyncError(propertyNames[0], message) |