Skip to content

fix(compiler): use strict equality for 'code' comparison - #56933

Closed
tomer953 wants to merge 1 commit into
angular:mainfrom
tomer953:patch-1
Closed

tomer953 wants to merge 1 commit into
angular:mainfrom
tomer953:patch-1

Conversation

@tomer953

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.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

The code uses a loose equality comparison (==) for the code variable.

Issue Number: N/A

What is the new behavior?

The code now uses strict equality comparison (===) for the code variable, ensuring type safety and preventing unintended type coercion.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

this was introduces in v18.1.0 release, in this PR:
#56764

@google-cla

google-cla Bot commented Jul 10, 2024

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@pullapprove
pullapprove Bot requested a review from AndrewKushnir July 10, 2024 18:57
@angular-robot angular-robot Bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Jul 10, 2024
@ngbot ngbot Bot added this to the Backlog milestone Jul 10, 2024
@AndrewKushnir
AndrewKushnir requested review from crisbeto and removed request for AndrewKushnir July 10, 2024 21:44
Replace loose equality (==) with strict equality (===) for the 'code' variable.
This change ensures type safety and prevents unintended type coercion.
@tomer953

Copy link
Copy Markdown
Contributor Author

sorry I created the same PR again with updated commit msg
#56944

@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 Aug 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: compiler Issues related to `ngc`, Angular's template compiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant