Skip to content

Commit

Permalink
Remove unnecessary updating state from SingleSelectionController
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 461975985
  • Loading branch information
AndrewJakubowicz authored and copybara-github committed Jul 19, 2022
1 parent ae034d8 commit 1ef99c8
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions radio/lib/single-selection-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ export class SingleSelectionController {

private mouseIsDown = false;

private updating = false;

/**
* Get a controller for the given element. If no controller exists, one will
* be created. Defaults to getting the controller scoped to the element's root
Expand Down Expand Up @@ -305,10 +303,6 @@ export class SingleSelectionController {
* @param element Element from which to calculate selection controller update.
*/
update(element: CheckableElement) {
if (this.updating) {
return;
}
this.updating = true;
const set = this.getSet(element.name);
if (element.checked) {
for (const e of set.set) {
Expand All @@ -330,6 +324,5 @@ export class SingleSelectionController {
e.formElementTabIndex = e.checked ? 0 : -1;
}
}
this.updating = false;
}
}

0 comments on commit 1ef99c8

Please sign in to comment.