Skip to content

Commit 70af5aa

Browse files
PVince81backportbot[bot]
authored andcommitted
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>
1 parent 1d0b210 commit 70af5aa

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

apps/files_sharing/src/mixins/SharesMixin.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,14 @@ export default {
248248
try {
249249
await this.updateShare(this.share.id, properties)
250250

251+
if (propertyNames.indexOf('password') >= 0) {
252+
// reset password state after sync
253+
this.$delete(this.share, 'newPassword')
254+
}
255+
251256
// clear any previous errors
252257
this.$delete(this.errors, propertyNames[0])
253258

254-
// reset password state after sync
255-
this.$delete(this.share, 'newPassword')
256259
} catch ({ message }) {
257260
if (message && message !== '') {
258261
this.onSyncError(propertyNames[0], message)

0 commit comments

Comments
 (0)