Skip to content

Commit

Permalink
Use some() instead of findIndex() !== -1
Browse files Browse the repository at this point in the history
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
  • Loading branch information
raimund-schluessler authored and ShGKme committed Mar 28, 2023
1 parent bb283ed commit 92851bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/NcAppSidebar/NcAppSidebarTabs.vue
Expand Up @@ -200,7 +200,7 @@ export default {
*/
updateActive() {
this.activeTab = this.active
&& this.tabs.findIndex(tab => tab.id === this.active) !== -1
&& this.tabs.some(tab => tab.id === this.active)
? this.active
: this.tabs.length > 0
? this.tabs[0].id
Expand Down

0 comments on commit 92851bb

Please sign in to comment.