We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ec77db commit 9a50c0aCopy full SHA for 9a50c0a
src/js/controllers/tabs_controller.js
@@ -9,8 +9,11 @@ export default class extends Controller {
9
this.data.get("inactiveTab") || "inactive"
10
).split(" ")
11
if (this.anchor) {
12
- this.index = this.tabTargets.findIndex((tab) => tab.id === this.anchor)
13
- this.showTab()
+ const index = this.tabTargets.findIndex((tab) => tab.id === this.anchor)
+ if (index >= 0) {
14
+ this.index = index
15
+ this.showTab()
16
+ }
17
}
18
19
0 commit comments