mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
1d1304c70c
When a form is reset, it goes through `_forEachChild` to call `reset` on each of its children. The problem is that if a control is removed while the loop is running (e.g. by a subscription), the form will throw an error, because it built up the list of available control before the loop started. These changes fix the issue by adding a null check before invoing the callback. Fixes #33401. PR Close #40462