Skip to content

Commit

Permalink
Avoid unneccesary function
Browse files Browse the repository at this point in the history
  • Loading branch information
36degrees committed Jun 25, 2020
1 parent d29b200 commit 82c5bf0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/govuk/components/checkboxes/checkboxes.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ Checkboxes.prototype.init = function () {
}

Checkboxes.prototype.syncAll = function () {
nodeListForEach(this.$inputs, function ($input) {
this.syncWithInputState($input)
}.bind(this))
nodeListForEach(this.$inputs, this.syncWithInputState.bind(this))
}

Checkboxes.prototype.syncWithInputState = function ($input) {
Expand Down
4 changes: 1 addition & 3 deletions src/govuk/components/radios/radios.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ Radios.prototype.init = function () {
}

Radios.prototype.syncAll = function () {
nodeListForEach(this.$inputs, function ($input) {
this.syncWithInputState($input)
}.bind(this))
nodeListForEach(this.$inputs, this.syncWithInputState.bind(this))
}

Radios.prototype.syncWithInputState = function ($input) {
Expand Down

0 comments on commit 82c5bf0

Please sign in to comment.