-
Notifications
You must be signed in to change notification settings - Fork 26.3k
refactor(compiler): remove empty string suffix from interpolati… #60066
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
refactor(compiler): remove empty string suffix from interpolati… #60066
Conversation
a7c58e1
to
536b79a
Compare
c7a385e
to
29cdcb6
Compare
if (interpolationParts.length > 0) { | ||
// This handles potential undefined last suffix in the interpolationParts array. | ||
if (interpolationParts[interpolationParts.length - 1] === undefined) { | ||
interpolationParts.pop(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to mutate the array instead of skipping the last value when reading it instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The next line is a interpolationParts.join()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't we handle this at the call site by doing something like suffix || ''
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you prefer that we can go that road. It's 16 callsites but they are guarded by ngDevMode
.
29cdcb6
to
5615563
Compare
5615563
to
1058c78
Compare
1058c78
to
9c99e9a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM on build infra (APF is already shipping ES2022; so it makes sense)
LGTM but it needs rebase, hence cleanup |
9c99e9a
to
ff78dd7
Compare
ff78dd7
to
223fb69
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reviewed-for: public-api
Reviewed-for: fw-general
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reviewed-for: fw-security
…on instructions With this change, interpolations that don't have a suffix will miss the last argument which was previously an empty string.
223fb69
to
c8f871c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reviewed-for: fw-security
This PR was merged into the repository by commit c73520b. The changes were merged into the following branches: main |
Caretaker note: presubmit is "green". |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
…on instructions
With this change, interpolations that don't have a suffix will miss the last argument which was previously an empty string.