fix(ivy): allow empty cases for ICU expressions (#30846)
We used to ignore empty strings for optimization purposes, but it turns out that empty strings are also valid values for ICU cases and we shouldn't ignore those. FW-1290 #resolve PR Close #30846
This commit is contained in:

committed by
Misko Hevery

parent
b74df20c2a
commit
0d4f8c7dd9
@ -618,6 +618,13 @@ onlyInIvy('Ivy i18n logic').describe('runtime i18n', () => {
|
||||
|
||||
expect(fixture.nativeElement.innerHTML).toContain('at least');
|
||||
});
|
||||
|
||||
it('with empty values', () => {
|
||||
const fixture = initWithTemplate(AppComp, `{count, select, 10 {} 20 {twenty} other {other}}`);
|
||||
|
||||
const element = fixture.nativeElement;
|
||||
expect(element).toHaveText('other');
|
||||
});
|
||||
});
|
||||
|
||||
describe('should support attributes', () => {
|
||||
|
Reference in New Issue
Block a user