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 <[email protected]>
  • Loading branch information
raimund-schluessler committed Mar 16, 2023
1 parent 9349538 commit 98ee351
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/NcAppSidebar/NcAppSidebarTabs.vue
Original file line number Diff line number Diff line change
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 98ee351

Please sign in to comment.