( currentDef: DirectiveDef<any> | null, tNode: TNode, lView: LView, )
| 706 | * instead of the current renderer (see the componentSyntheticHost* instructions). |
| 707 | */ |
| 708 | export function loadComponentRenderer( |
| 709 | currentDef: DirectiveDef<any> | null, |
| 710 | tNode: TNode, |
| 711 | lView: LView, |
| 712 | ): Renderer { |
| 713 | // TODO(FW-2043): the `currentDef` is null when host bindings are invoked while creating root |
| 714 | // component (see packages/core/src/render3/component.ts). This is not consistent with the process |
| 715 | // of creating inner components, when current directive index is available in the state. In order |
| 716 | // to avoid relying on current def being `null` (thus special-casing root component creation), the |
| 717 | // process of creating root component should be unified with the process of creating inner |
| 718 | // components. |
| 719 | if (currentDef === null || isComponentDef(currentDef)) { |
| 720 | lView = unwrapLView(lView[tNode.index])!; |
| 721 | } |
| 722 | return lView[RENDERER]; |
| 723 | } |
| 724 | |
| 725 | /** Handles an error thrown in an LView. */ |
| 726 | export function handleUncaughtError(lView: LView, error: any): void { |
no test coverage detected