From 205e0c2ded92c199c6b5e5b413220915a9979a3d Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Thu, 22 Apr 2021 16:04:18 +0200
Subject: [PATCH] Fix an error in case the clipboard is disabled

Otherwhise it will try to access it an error out when trying to open
the dialog.
---
 packages/file-handling/src/file-source.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/file-handling/src/file-source.js b/packages/file-handling/src/file-source.js
index 5de0a176..a7b5f945 100644
--- a/packages/file-handling/src/file-source.js
+++ b/packages/file-handling/src/file-source.js
@@ -379,7 +379,7 @@ export class FileSource extends ScopedElementsMixin(DBPLitElement) {
             this.loadWebdavDirectory();
         }
 
-        if (this.enabledTargets.includes('clipboard')) {
+        if (this.enabledTargets.includes('clipboard') && this.showClipboard) {
             this._("#clipboard-file-picker").generateClipboardTable();
             this._("#clipboard-file-picker").showSelectAllButton = true;
         }
-- 
GitLab