Skip to content

Commit 3e18eca

Browse files
Merge pull request #26059 from nextcloud/backport/25911/stable20
[stable20] Only clear share password model when actually saved
2 parents 25f2756 + 51ba0fa commit 3e18eca

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

apps/files_sharing/js/dist/files_sharing_tab.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/files_sharing/js/dist/files_sharing_tab.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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)