Skip to content
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

fix(ngcc): do not add trailing commas in UMD imports #34545

Closed
wants to merge 2 commits into from

Conversation

@gkalpak
Copy link
Member

gkalpak commented Dec 23, 2019

Previously, if UmdRenderingFormatter#addImports() was called with an empty list of imports to add (i.e. no new imports were needed), it would add trailing commas in several locations (arrays, function arguments, function parameters), thus making the code imcompatible with legacy browsers such as IE11.

This commit fixes it by ensuring that no trailing commas are added if addImports() is called with an empty list of imports.
This is a follow-up to #34353.

Fixes #34525.

Previously, if `UmdRenderingFormatter#addImports()` was called with an
empty list of imports to add (i.e. no new imports were needed), it would
add trailing commas in several locations (arrays, function arguments,
function parameters), thus making the code imcompatible with legacy
browsers such as IE11.

This commit fixes it by ensuring that no trailing commas are added if
`addImports()` is called with an empty list of imports.
This is a follow-up to #34353.

Fixes #34525
@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Dec 23, 2019

@gkalpak gkalpak marked this pull request as ready for review Dec 23, 2019
@gkalpak gkalpak requested review from angular/fw-integration as code owners Dec 23, 2019
@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Dec 23, 2019

alxhub added a commit that referenced this pull request Jan 7, 2020
Previously, if `UmdRenderingFormatter#addImports()` was called with an
empty list of imports to add (i.e. no new imports were needed), it would
add trailing commas in several locations (arrays, function arguments,
function parameters), thus making the code imcompatible with legacy
browsers such as IE11.

This commit fixes it by ensuring that no trailing commas are added if
`addImports()` is called with an empty list of imports.
This is a follow-up to #34353.

Fixes #34525

PR Close #34545
@alxhub alxhub closed this in 10e2935 Jan 7, 2020
@gkalpak gkalpak deleted the gkalpak:fix-ngcc-umd-no-imports branch Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.