]> source.dussan.org Git - nextcloud-server.git/commitdiff
Prevent multiple systemtags views
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Mon, 14 Oct 2019 20:55:58 +0000 (22:55 +0200)
committerDaniel Calviño Sánchez <danxuliu@gmail.com>
Tue, 29 Oct 2019 12:20:07 +0000 (13:20 +0100)
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
apps/files/src/services/Sidebar.js
apps/systemtags/src/systemtagsinfoview.js

index 8f02a1b51ab6161bdd16907de60d651fa8fe957c..2bb836272fa98ab3747e10b8976a951c26731d95 100644 (file)
@@ -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
index 2ec1ba0fef4fe02de32dce4967b5bd91ededa40c..d5b8b2f27209df995f893bac1f05467a71fa180b 100644 (file)
@@ -31,6 +31,7 @@
                        _rendered: false,
 
                        className: 'systemTagsInfoView',
+                       name: 'systemTags',
 
                        /**
                         * @type OC.SystemTags.SystemTagsInputField