Skip to content

feat(compiler): Angular expressions with optional chaining returns undefined#68084

Draft
JeanMeche wants to merge 1 commit intoangular:mainfrom
JeanMeche:optional-chaining-specs
Draft

feat(compiler): Angular expressions with optional chaining returns undefined#68084
JeanMeche wants to merge 1 commit intoangular:mainfrom
JeanMeche:optional-chaining-specs

Conversation

@JeanMeche
Copy link
Copy Markdown
Member

This is an exploration prototype.


To mitigate this breaking change, the feature can be disabled with the useNullForOptionalChaining.

fixes #34385

BREAKING CHANGE: By default optional chainings will now return undefined instead of null. This behavior can be disabled by setting useNullForOptionalChaining: true in your tsconfig.

@angular-robot angular-robot bot added detected: breaking change PR contains a commit with a breaking change detected: feature PR contains a feature commit area: compiler Issues related to `ngc`, Angular's template compiler labels Apr 8, 2026
@ngbot ngbot bot added this to the Backlog milestone Apr 8, 2026
@JeanMeche JeanMeche force-pushed the optional-chaining-specs branch 4 times, most recently from 1620c11 to 0d14c4e Compare April 8, 2026 15:51
…ndefined`

To mitigate this breaking change, the feature can be disabled with the `useNullForOptionalChaining`.

fixes angular#34385, angular#37622

BREAKING CHANGE: By default optional chainings will now return `undefined` instead of `null`.  This behavior can be disabled by setting `useNullForOptionalChaining: true` in your `tsconfig`.
@JeanMeche JeanMeche force-pushed the optional-chaining-specs branch from 0d14c4e to 5ef1edc Compare April 8, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: compiler Issues related to `ngc`, Angular's template compiler detected: breaking change PR contains a commit with a breaking change detected: feature PR contains a feature commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align with the optional chaining spec

1 participant