fix(i18n): avoid a ...null spread in extraction#16547
Closed
mprobst wants to merge 1 commit into
Closed
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.
ocombe
approved these changes
May 4, 2017
ocombe
left a comment
Contributor
There was a problem hiding this comment.
This makes sense, I don't any side effect to it
matsko
pushed a commit
that referenced
this pull request
May 4, 2017
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
Contributor
Author
|
@matsko I'm confused - was this merged? |
mhevery
approved these changes
May 8, 2017
jasonaden
pushed a commit
to jasonaden/angular
that referenced
this pull request
May 10, 2017
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
Contributor
|
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 |
Contributor
Author
|
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.
|
asnowwolf
pushed a commit
to asnowwolf/angular
that referenced
this pull request
Aug 11, 2017
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
juleskremer
pushed a commit
to juleskremer/angular
that referenced
this pull request
Aug 28, 2017
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This code only runs in ES5 mode in the test suite, so this is difficult to test. However
updateFromTemplateis being called with a spread operator, as...updateFromTemplate(...). The spread operator should fail onnullvalues. This change avoids the problem by always returning a (possibly empty) array.