fix(ivy): error when encountering an empty class attribute (#28321)
Fixes Ivy throwing an error if it encounters an empty class attribute in a template (`class=""`). This PR resolves FW-972. PR Close #28321
This commit is contained in:

committed by
Jason Aden

parent
9098225ff0
commit
22a43cff4d
@ -317,6 +317,13 @@ function declareTests(config?: {useJit: boolean}) {
|
||||
expect(ctx.componentInstance.viewContainers.first).toBe(vc);
|
||||
});
|
||||
|
||||
it('should not throw when encountering an empty class attribute', () => {
|
||||
const template = '<div class=""></div>';
|
||||
TestBed.overrideComponent(MyComp1, {set: {template}});
|
||||
|
||||
expect(() => TestBed.createComponent(MyComp1)).not.toThrow();
|
||||
});
|
||||
|
||||
describe('empty templates - #15143', () => {
|
||||
it('should allow empty components', () => {
|
||||
@Component({template: ''})
|
||||
|
Reference in New Issue
Block a user