Skip to content

Commit

Permalink
Prefer $nextTab for consistency
Browse files Browse the repository at this point in the history
Use use this name in other methods
  • Loading branch information
colinrotherham committed Feb 3, 2023
1 parent 571025c commit 629211a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/govuk/components/tabs/tabs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,12 @@ Tabs.prototype.unsetAttributes = function ($tab) {
Tabs.prototype.onTabClick = function (event) {
event.preventDefault()

var $newTab = event.currentTarget
var $nextTab = event.currentTarget
var $currentTab = this.getCurrentTab()

this.hideTab($currentTab)
this.showTab($newTab)
this.createHistoryEntry($newTab)
this.showTab($nextTab)
this.createHistoryEntry($nextTab)
}

/**
Expand Down

0 comments on commit 629211a

Please sign in to comment.