From 480691a56951e85bf32c86e43e2d3e93dad03560 Mon Sep 17 00:00:00 2001 From: =?utf8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Mon, 14 Oct 2019 22:55:58 +0200 Subject: [PATCH] Prevent multiple systemtags views MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- apps/files/src/services/Sidebar.js | 2 +- apps/systemtags/src/systemtagsinfoview.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/files/src/services/Sidebar.js b/apps/files/src/services/Sidebar.js index 8f02a1b51ab..2bb836272fa 100644 --- a/apps/files/src/services/Sidebar.js +++ b/apps/files/src/services/Sidebar.js @@ -67,7 +67,7 @@ export default class Sidebar { } registerSecondaryView(view) { - const hasDuplicate = this.#state.views.findIndex(check => check.cid === view.cid) > -1 + const hasDuplicate = this.#state.views.findIndex(check => check.name === view.name) > -1 if (!hasDuplicate) { this.#state.views.push(view) return true diff --git a/apps/systemtags/src/systemtagsinfoview.js b/apps/systemtags/src/systemtagsinfoview.js index 2ec1ba0fef4..d5b8b2f2720 100644 --- a/apps/systemtags/src/systemtagsinfoview.js +++ b/apps/systemtags/src/systemtagsinfoview.js @@ -31,6 +31,7 @@ _rendered: false, className: 'systemTagsInfoView', + name: 'systemTags', /** * @type OC.SystemTags.SystemTagsInputField -- 2.39.5