fix(ivy): R3TestBed doesn't allow template overrides with an empty string (#30602)
Prior to this change a component was considered unresolved (i.e. having dynamic resources that should be loaded, like external template or stylesheets) even if template override was provided as an empty string (for example, via TestBed.overrideTemplateUsingTestingModule call). This commit fixes the condition that previously treated empty string as an absent template value. PR Close #30602
This commit is contained in:

committed by
Jason Aden

parent
fa6cbb3ffe
commit
86c46908d4
@ -103,7 +103,7 @@ export function isComponentDefPendingResolution(type: Type<any>): boolean {
|
||||
|
||||
export function componentNeedsResolution(component: Component): boolean {
|
||||
return !!(
|
||||
(component.templateUrl && !component.template) ||
|
||||
(component.templateUrl && !component.hasOwnProperty('template')) ||
|
||||
component.styleUrls && component.styleUrls.length);
|
||||
}
|
||||
export function clearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component> {
|
||||
|
Reference in New Issue
Block a user