Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit 38b2bd8

Browse files
TedSandernshahan
authored andcommitted
Protect against the group being destroyed before the tabIndex code could be run.
PiperOrigin-RevId: 185259776
1 parent 2f12404 commit 38b2bd8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/material_radio/material_radio_group.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ class MaterialRadioGroupComponent
166166
// Since this is updating children that were already dirty-checked,
167167
// need to delay this change until next angular cycle.
168168
_ngZone.onEventDone.first.then((_) {
169+
if (_children == null) return; // Component was destoryed.
169170
// Disable everything first.
170171
for (var child in _children) {
171172
child.tabbable = false;

0 commit comments

Comments
 (0)