Skip to content

Add a null check to autocomplete options #30734

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

Merged
merged 2 commits into from
Apr 2, 2025

Conversation

rileyajones
Copy link
Contributor

If a mat-autocomplete element does not contain any mat-options it will throw a null pointer when it is unloaded. Adding a simple null check solves this.

Googlers see cl/741219851

@rileyajones rileyajones requested a review from a team as a code owner March 27, 2025 21:12
@rileyajones rileyajones requested review from crisbeto and mmalerba and removed request for a team March 27, 2025 21:12
@mmalerba mmalerba added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Apr 2, 2025
@mmalerba mmalerba merged commit febc0eb into angular:main Apr 2, 2025
9 of 11 checks passed
mmalerba pushed a commit that referenced this pull request Apr 2, 2025
* fix a bug with null options

* Add a test

(cherry picked from commit febc0eb)
mistrykaran91 pushed a commit to mistrykaran91/components that referenced this pull request Apr 7, 2025
* fix a bug with null options

* Add a test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker 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