( currentDef: DirectiveDef<any> | null, tNode: TNode, lView: LView, )
| 687 | * instead of the current renderer (see the componentSyntheticHost* instructions). |
| 688 | */ |
| 689 | export function loadComponentRenderer( |
| 690 | currentDef: DirectiveDef<any> | null, |
| 691 | tNode: TNode, |
| 692 | lView: LView, |
| 693 | ): Renderer { |
| 694 | // TODO(FW-2043): the `currentDef` is null when host bindings are invoked while creating root |
| 695 | // component (see packages/core/src/render3/component.ts). This is not consistent with the process |
| 696 | // of creating inner components, when current directive index is available in the state. In order |
| 697 | // to avoid relying on current def being `null` (thus special-casing root component creation), the |
| 698 | // process of creating root component should be unified with the process of creating inner |
| 699 | // components. |
| 700 | if (currentDef === null || isComponentDef(currentDef)) { |
| 701 | lView = unwrapLView(lView[tNode.index])!; |
| 702 | } |
| 703 | return lView[RENDERER]; |
| 704 | } |
| 705 | |
| 706 | /** Handles an error thrown in an LView. */ |
| 707 | export function handleUncaughtError(lView: LView, error: any): void { |
no test coverage detected
searching dependent graphs…