Skip to content

fix(core): check ngDevMode for undefined#60565

Closed
BenjaminPabst wants to merge 1 commit intoangular:mainfrom
BenjaminPabst:fix-ng-dev-mode
Closed

fix(core): check ngDevMode for undefined#60565
BenjaminPabst wants to merge 1 commit intoangular:mainfrom
BenjaminPabst:fix-ng-dev-mode

Conversation

@BenjaminPabst
Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

In some MFE applications, ngDevMode is not defined in some cases (see e.g., ngrx/platform#4703) caused by webpack's tree shaking approx, by not checking if it is defined at all, this breaks.

Issue Number: N/A

What is the new behavior?

ngDevMode is also checked for undefined (as already done in other places in the same file).

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pullapprove pullapprove bot requested a review from thePunderWoman March 26, 2025 13:46
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Mar 26, 2025
@ngbot ngbot bot added this to the Backlog milestone Mar 26, 2025
Copy link
Copy Markdown
Contributor

@thePunderWoman thePunderWoman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

@thePunderWoman thePunderWoman added target: patch This PR is targeted for the next patch release action: presubmit The PR is in need of a google3 presubmit action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: presubmit The PR is in need of a google3 presubmit labels Mar 26, 2025
@thePunderWoman
Copy link
Copy Markdown
Contributor

@BenjaminPabst Looks like this has a lint issue. Can you git commit --amend and add a body to your commit message, then force push? That should resolve it.

@JeanMeche JeanMeche added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Mar 27, 2025
This adds a check to "toSignal" whether ngDevMode is not undefined as this can happen for some MFE applications.
thePunderWoman pushed a commit that referenced this pull request Mar 27, 2025
This adds a check to "toSignal" whether ngDevMode is not undefined as this can happen for some MFE applications.

PR Close #60565
@thePunderWoman
Copy link
Copy Markdown
Contributor

This PR was merged into the repository by commit 765ba1e.

The changes were merged into the following branches: main, 19.2.x

@angular-automatic-lock-bot
Copy link
Copy Markdown

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 Apr 27, 2025
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: core Issues related to the framework runtime 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