angular-docs-cn/goldens/size-tracking
Kristiyan Kostadinov 8628826535 fix(core): incorrect error reported when trying to re-create view which had an error during creation (#43005)
Currently if a view throws an error during creation mode, we mark it as `incompleteFirstPass` so that we can try to recover later. The recovery is only possible inside component views.

The problem is that when this was introduced, I forgot to flip the `firstCreatePass` when an error is thrown which meant that calling `renderView` on the same component again is allowed. It will eventually hit an assertion which can be confusing for the end user. This issue only manifests itself when rendering views "manually" through `ViewContainerRef` (e.g. using `NgIf`).

These changes flip the `firstCreatePass` back to false on errors so that trying to re-render the same view will throw an error which is consistent to the one that broke the view during creation.

Fixes #41383.

PR Close #43005
2021-08-04 08:58:28 -07:00
..
aio-payloads.json fix(docs-infra): log more SW debug info (#42776) 2021-07-07 13:37:05 -07:00
integration-payloads.json fix(core): incorrect error reported when trying to re-create view which had an error during creation (#43005) 2021-08-04 08:58:28 -07:00