refactor(core): remove redundant hydrationInfo check (#49926)

This check is not needed as it is done in the previous line

PR Close #49926
This commit is contained in:
Alan Agius 2023-04-19 08:37:37 +00:00 committed by Jessica Janiuk
parent 4175f6fa09
commit efb3c68899

View file

@ -23,8 +23,6 @@ import {getConstant} from '../util/view_utils';
import {addToViewTree, createDirectivesInstances, createLContainer, createTView, getOrCreateTNode, resolveDirectives, saveResolvedLocalsInData} from './shared';
function templateFirstCreatePass(
index: number, tView: TView, lView: LView, templateFn: ComponentTemplate<any>|null,
decls: number, vars: number, tagName?: string|null, attrsIndex?: number|null,
@ -36,7 +34,7 @@ function templateFirstCreatePass(
const hydrationInfo = lView[HYDRATION];
if (hydrationInfo) {
const noOffsetIndex = index - HEADER_OFFSET;
ssrId = (hydrationInfo && hydrationInfo.data[TEMPLATES]?.[noOffsetIndex]) ?? null;
ssrId = hydrationInfo.data[TEMPLATES]?.[noOffsetIndex] ?? null;
}
// TODO(pk): refactor getOrCreateTNode to have the "create" only version
const tNode = getOrCreateTNode(