Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cdk/portal): prevent calling ApplicationRef.detachView on destroyed instance #24775

Merged
merged 1 commit into from
Apr 18, 2022

Conversation

AndrewKushnir
Copy link
Contributor

This commit adds a check that ensures that the ApplicationRef.detachView is only called when there are some registered views in the ApplicationRef instance (thus the instance is not destroyed).

Calling ApplicationRef APIs on destroyed instance will result in an error after angular/angular#45624. This commit makes the code forward-compatible with the upcoming changes. The error was discovered in g3 while running a TGP for angular/angular#45624.

…oyed instance

This commit adds a check that ensures that the `ApplicationRef.detachView` is only called when there are some registered views in the `ApplicationRef` instance (thus the instance is not destroyed).
@AndrewKushnir AndrewKushnir added target: patch This PR is targeted for the next patch release area: cdk/portal labels Apr 14, 2022
@AndrewKushnir AndrewKushnir marked this pull request as ready for review April 14, 2022 16:17
@andrewseguin andrewseguin added the action: merge The PR is ready for merge by the caretaker label Apr 14, 2022
@andrewseguin andrewseguin self-assigned this Apr 14, 2022
@zarend zarend merged commit c04f941 into angular:master Apr 18, 2022
zarend pushed a commit that referenced this pull request Apr 18, 2022
…oyed instance (#24775)

This commit adds a check that ensures that the `ApplicationRef.detachView` is only called when there are some registered views in the `ApplicationRef` instance (thus the instance is not destroyed).

(cherry picked from commit c04f941)
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Apr 25, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@angular/cdk](https://github.com/angular/components) | dependencies | patch | [`13.3.3` -> `13.3.4`](https://renovatebot.com/diffs/npm/@angular%2fcdk/13.3.3/13.3.4) |
| [@angular/material](https://github.com/angular/components) | dependencies | patch | [`13.3.3` -> `13.3.4`](https://renovatebot.com/diffs/npm/@angular%2fmaterial/13.3.3/13.3.4) |

---

### Release Notes

<details>
<summary>angular/components</summary>

### [`v13.3.4`](https://github.com/angular/components/blob/HEAD/CHANGELOG.md#&#8203;1334-adamantium-albatross-2022-04-20)

[Compare Source](angular/components@13.3.3...13.3.4)

##### cdk

| Commit | Type | Description |
| -- | -- | -- |
| [eef47579f](angular/components@eef4757) | fix | **portal:** prevent calling `ApplicationRef.detachView` on destroyed instance ([#&#8203;24775](angular/components#24775)) |

#### Special Thanks

Andrew Kushnir, Kristiyan Kostadinov, Paul Gschwendtner and Zach Arend

<!-- CHANGELOG SPLIT MARKER -->

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).

Co-authored-by: cabr2-bot <[email protected]>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1315
Reviewed-by: Epsilon_02 <[email protected]>
Co-authored-by: Calciumdibromid Bot <[email protected]>
Co-committed-by: Calciumdibromid Bot <[email protected]>
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: cdk/portal target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants