Skip to content

Commit

Permalink
cleaning up radioGroups map properly
Browse files Browse the repository at this point in the history
  • Loading branch information
marjonlynch committed Apr 21, 2020
1 parent aeb053b commit 522710d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/web-components/fast-components/src/radio/radio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,12 @@ export class Radio extends FormAssociated<HTMLInputElement> {
if (groupSet) {
groupSet.delete(this);
}

if (groupSet?.size === 0) {
radioGroups.delete(this.name);
}
}
console.log("global radioGroups is now:", radioGroups);
}

private updateForm(): void {
Expand Down

0 comments on commit 522710d

Please sign in to comment.