-
Notifications
You must be signed in to change notification settings - Fork 26.5k
fix(i18n): avoid a ...null
spread in extraction
#16547
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
Conversation
This code only runs in ES5 mode in the test suite, so this is difficult to test. However `updateFromTemplate` is being called with a spread operator, as `...updateFromTemplate(...)`. The spread operator should fail on `null` values. This change avoids the problem by always returning a (possibly empty) array.
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.
This makes sense, I don't any side effect to it
This code only runs in ES5 mode in the test suite, so this is difficult to test. However `updateFromTemplate` is being called with a spread operator, as `...updateFromTemplate(...)`. The spread operator should fail on `null` values. This change avoids the problem by always returning a (possibly empty) array. PR Close #16547
@matsko I'm confused - was this merged? |
This code only runs in ES5 mode in the test suite, so this is difficult to test. However `updateFromTemplate` is being called with a spread operator, as `...updateFromTemplate(...)`. The spread operator should fail on `null` values. This change avoids the problem by always returning a (possibly empty) array. PR Close angular#16547
I am not quite sure, but this have probably fixed an issue with i18n I was having with angular 4.1.1 where given:
after AOT build with provided translation files rendered empty tags like
|
Radoslav: that seems a bit unlikely – the symptom of this issue here is
that a ...spread would fail with a TypeError if run in an ES6 compliant VM
or with the new TS flag --downlevelIteration.
|
This code only runs in ES5 mode in the test suite, so this is difficult to test. However `updateFromTemplate` is being called with a spread operator, as `...updateFromTemplate(...)`. The spread operator should fail on `null` values. This change avoids the problem by always returning a (possibly empty) array. PR Close angular#16547
This code only runs in ES5 mode in the test suite, so this is difficult to test. However `updateFromTemplate` is being called with a spread operator, as `...updateFromTemplate(...)`. The spread operator should fail on `null` values. This change avoids the problem by always returning a (possibly empty) array. PR Close angular#16547
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. |
This code only runs in ES5 mode in the test suite, so this is difficult to test. However
updateFromTemplate
is being called with a spread operator, as...updateFromTemplate(...)
. The spread operator should fail onnull
values. This change avoids the problem by always returning a (possibly empty) array.