refactor(core): Ensure that previousOrParentTNode
always belongs to current TView
. (#38707)
`previousOrParentTNode` stores current `TNode`. Due to inconsistent implementation the value stored would sometimes belong to the current `TView` and sometimes to the parent. We have extra logic which accounts for it. A better solution is to just ensure that `previousOrParentTNode` always belongs to current `TNode`. This simplifies the mental model and cleans up some code. PR Close #38707
This commit is contained in:
@ -228,7 +228,7 @@ describe('di', () => {
|
||||
const contentView = createLView(
|
||||
null, createTView(TViewType.Component, -1, null, 1, 0, null, null, null, null, null), {},
|
||||
LViewFlags.CheckAlways, null, null, {} as any, {} as any);
|
||||
enterView(contentView, null);
|
||||
enterView(contentView);
|
||||
try {
|
||||
const parentTNode =
|
||||
getOrCreateTNode(contentView[TVIEW], null, 0, TNodeType.Element, null, null);
|
||||
|
Reference in New Issue
Block a user