diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-01-29 16:31:47 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-01-29 16:44:53 +0100 |
commit | b476659ac888618fdb01c1316db073237c9222d3 (patch) | |
tree | 05f722eeabf3de7fb0be5f53421bc32be467e03d /apps/files/src/services | |
parent | cd6a193793f5b0f34fbe5d9c4d52e54f94494237 (diff) | |
download | nextcloud-server-b476659ac888618fdb01c1316db073237c9222d3.tar.gz nextcloud-server-b476659ac888618fdb01c1316db073237c9222d3.zip |
Fix legacy tabs
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/src/services')
-rw-r--r-- | apps/files/src/services/Sidebar.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files/src/services/Sidebar.js b/apps/files/src/services/Sidebar.js index 42243b9de82..560db8862ec 100644 --- a/apps/files/src/services/Sidebar.js +++ b/apps/files/src/services/Sidebar.js @@ -56,17 +56,17 @@ export default class Sidebar { * @returns {Boolean} */ registerTab(tab) { - const hasDuplicate = this.#state.tabs.findIndex(check => check.name === tab.name) > -1 + const hasDuplicate = this.#state.tabs.findIndex(check => check.id === tab.id) > -1 if (!hasDuplicate) { this.#state.tabs.push(tab) return true } - console.error(`An tab with the same name ${tab.name} already exists`, tab) + console.error(`An tab with the same id ${tab.id} already exists`, tab) return false } registerSecondaryView(view) { - const hasDuplicate = this.#state.views.findIndex(check => check.name === view.name) > -1 + const hasDuplicate = this.#state.views.findIndex(check => check.id === view.id) > -1 if (!hasDuplicate) { this.#state.views.push(view) return true |