From 279e64b57ad0eb7f21d414eb855ef1e5c16d22cf Mon Sep 17 00:00:00 2001 From: JanAckermann Date: Tue, 5 Jul 2022 08:35:17 +0200 Subject: [PATCH 1/2] init var as empty array --- packages/web-app-files/src/store/actions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web-app-files/src/store/actions.js b/packages/web-app-files/src/store/actions.js index cd5d688217b..cac63c5ec1c 100644 --- a/packages/web-app-files/src/store/actions.js +++ b/packages/web-app-files/src/store/actions.js @@ -77,7 +77,7 @@ export default { upsertResource } ) { - let movedResources + let movedResources = [] if (context.state.clipboardAction === ClipboardActions.Cut) { movedResources = await move( context.state.clipboardResources, From 4f2b04aa907cbc06d1f2df76ff01a3b39d0b6f5d Mon Sep 17 00:00:00 2001 From: JanAckermann Date: Tue, 5 Jul 2022 08:39:02 +0200 Subject: [PATCH 2/2] Add changelog item --- .../unreleased/bugfix-error-when-pasting-empty-clipboard | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 changelog/unreleased/bugfix-error-when-pasting-empty-clipboard diff --git a/changelog/unreleased/bugfix-error-when-pasting-empty-clipboard b/changelog/unreleased/bugfix-error-when-pasting-empty-clipboard new file mode 100644 index 00000000000..3346fdde53e --- /dev/null +++ b/changelog/unreleased/bugfix-error-when-pasting-empty-clipboard @@ -0,0 +1,6 @@ +Bugfix: Prevent error when pasting with empty clipboard + +We've fixed a bug where an error was thrown when pasting with empty clipboard + +https://github.com/owncloud/web/pull/7214 +https://github.com/owncloud/web/issues/7146