From 15e2b5cf3d130c6ab9252ecfd25b5ac715a7b92e Mon Sep 17 00:00:00 2001 From: fenn-cs Date: Mon, 19 Feb 2024 16:25:53 +0100 Subject: [PATCH] Fix undefined share object during expirationDate update In 04e87337211351127cd02a0404936de8cb1b0837 a regression was introduced. `this` means nothing inside arrow functions, hence this.share was referring to an undefined object and so all attempted updates for expiration dates would fail. Resolves : https://github.com/nextcloud/server/issues/43256 Signed-off-by: fenn-cs --- apps/files_sharing/src/mixins/SharesMixin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_sharing/src/mixins/SharesMixin.js b/apps/files_sharing/src/mixins/SharesMixin.js index b76b72cebe9..5f973bf63cf 100644 --- a/apps/files_sharing/src/mixins/SharesMixin.js +++ b/apps/files_sharing/src/mixins/SharesMixin.js @@ -221,7 +221,7 @@ export default { * * @param {Date} date */ - onExpirationChange: debounce((date) => { + onExpirationChange: debounce(function(date) { this.share.expireDate = this.formatDateToString(new Date(date)) }, 500), /**