Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,6 @@ export const buildDirectiveForest = (): ComponentTreeNode[] => {
while (frontier.length) {
const node = frontier.pop()!;
node.element ??= node.nativeElement?.nodeName.toLowerCase() ?? '';
node.hydration ??= null;
node.component!.isElement ??= false;
for (const child of node.children) {
frontier.push(child);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export function createControlFlowTreeNode(
directives: [],
element: ELEMENT_NAME_MAP[controlFlowBlock.type],
nativeElement: undefined,
hydration: null,
controlFlowBlock: mapToDevtoolsControlFlowModel(controlFlowBlock, iteratorCurrentIdx, rootId),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ export class LTreeStrategy {
element,
directives: [],
component: null,
hydration: null, // We know there is no hydration if we use the LTreeStrategy
controlFlowBlock: null, // neither there will be any control flow block
};
}
Expand All @@ -120,7 +119,6 @@ export class LTreeStrategy {
element,
directives,
component,
hydration: null, // We know there is no hydration if we use the LTreeStrategy
controlFlowBlock: null, // neither there will be any control flow block
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ function groupControlFlowBlocksChildren(
result.push(blockTreeNode);
}

function hydrationStatus(element: Node): HydrationStatus {
function hydrationStatus(element: Node): HydrationStatus | undefined {
if (!(element instanceof Element)) {
return null;
return undefined;
}

if (!!element.getAttribute('ngh')) {
Expand All @@ -156,7 +156,7 @@ function hydrationStatus(element: Node): HydrationStatus {
actualNodeDetails: hydrationInfo.actualNodeDetails,
};
default:
return null;
return undefined;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const tree1: DevToolsNode = {
},
],
component: null,
hydration: null,
controlFlowBlock: null,

children: [
Expand All @@ -33,7 +32,6 @@ const tree1: DevToolsNode = {
},
directives: [],
element: 'bar',
hydration: null,
nativeElement: document.createElement('bar'),
controlFlowBlock: null,
},
Expand All @@ -50,7 +48,6 @@ const tree2: DevToolsNode = {
},
],
component: null,
hydration: null,
controlFlowBlock: null,

children: [
Expand All @@ -63,7 +60,6 @@ const tree2: DevToolsNode = {
},
directives: [],
element: 'bar',
hydration: null,
nativeElement: document.createElement('bar'),
controlFlowBlock: null,
},
Expand All @@ -76,7 +72,6 @@ const tree2: DevToolsNode = {
},
directives: [],
element: 'qux',
hydration: null,
controlFlowBlock: null,
},
],
Expand All @@ -92,7 +87,6 @@ const tree3: DevToolsNode = {
},
],
component: null,
hydration: null,
controlFlowBlock: null,
children: [
{
Expand All @@ -104,7 +98,6 @@ const tree3: DevToolsNode = {
},
directives: [],
element: '#comment',
hydration: null,
controlFlowBlock: null,
nativeElement: document.createComment('bar'),
},
Expand All @@ -117,7 +110,6 @@ const tree3: DevToolsNode = {
},
directives: [],
element: '#comment',
hydration: null,
controlFlowBlock: null,
nativeElement: document.createComment('bar'),
},
Expand All @@ -127,7 +119,6 @@ const tree3: DevToolsNode = {

const tree4: DevToolsNode = {
element: 'app',
hydration: null,
controlFlowBlock: null,
directives: [
{
Expand All @@ -154,7 +145,6 @@ const tree4: DevToolsNode = {
},
directives: [],
element: 'bar',
hydration: null,
controlFlowBlock: null,
nativeElement: document.createComment('bar'),
},
Expand All @@ -166,7 +156,6 @@ const tree4: DevToolsNode = {
},
directives: [],
element: '#comment',
hydration: null,
controlFlowBlock: null,
nativeElement: document.createComment('bar'),
},
Expand All @@ -178,7 +167,6 @@ const tree4: DevToolsNode = {
},
directives: [],
element: '#comment',
hydration: null,
controlFlowBlock: null,
nativeElement: document.createComment('bar'),
},
Expand All @@ -190,7 +178,6 @@ const tree4: DevToolsNode = {
},
directives: [],
element: '#comment',
hydration: null,
controlFlowBlock: null,
nativeElement: document.createComment('bar'),
},
Expand All @@ -202,7 +189,6 @@ const tree4: DevToolsNode = {
},
directives: [],
element: '#comment',
hydration: null,
nativeElement: document.createComment('bar'),
controlFlowBlock: null,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface FlatNode {
level: number;
original: IndexedNode;
newItem?: boolean;
hydration: HydrationStatus;
hydration?: HydrationStatus;
controlFlowBlock: ControlFlowBlock | null;
changeDetection?: ChangeDetection;
hasNativeElement: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ describe('indexForest', () => {
{
element: 'Parent1',
directives: [],
hydration: null,
component: {
isElement: false,
name: 'Cmp1',
Expand All @@ -29,7 +28,6 @@ describe('indexForest', () => {
children: [
{
element: 'Child1_1',
hydration: null,
directives: [
{
name: 'Dir1',
Expand All @@ -49,7 +47,6 @@ describe('indexForest', () => {
{
element: 'Child1_2',
directives: [],
hydration: null,
component: {
isElement: false,
name: 'Cmp2',
Expand All @@ -69,7 +66,6 @@ describe('indexForest', () => {
element: 'Parent2',
directives: [],
component: null,
hydration: null,
children: [
{
element: 'Child2_1',
Expand All @@ -79,7 +75,6 @@ describe('indexForest', () => {
id: 1,
},
],
hydration: null,
component: null,
children: [],
changeDetection: 'ng-eager',
Expand All @@ -99,7 +94,6 @@ describe('indexForest', () => {
},
],
component: null,
hydration: null,
children: [],
changeDetection: 'ng-eager',
controlFlowBlock: null,
Expand All @@ -116,7 +110,7 @@ describe('indexForest', () => {
element: 'Parent1',
directives: [],
position: [0],
hydration: null,
hydration: undefined,
component: {
isElement: false,
name: 'Cmp1',
Expand All @@ -137,7 +131,7 @@ describe('indexForest', () => {
},
],
component: null,
hydration: null,
hydration: undefined,
children: [],
changeDetection: 'ng-on-push',
controlFlowBlock: null,
Expand All @@ -153,7 +147,7 @@ describe('indexForest', () => {
name: 'Cmp2',
id: 1,
},
hydration: null,
hydration: undefined,
children: [],
controlFlowBlock: null,
changeDetection: 'ng-on-push',
Expand All @@ -172,7 +166,7 @@ describe('indexForest', () => {
directives: [],
component: null,
position: [1],
hydration: null,
hydration: undefined,
children: [
{
element: 'Child2_1',
Expand All @@ -184,7 +178,7 @@ describe('indexForest', () => {
},
],
component: null,
hydration: null,
hydration: undefined,
children: [],
changeDetection: 'ng-eager',
controlFlowBlock: null,
Expand All @@ -206,7 +200,7 @@ describe('indexForest', () => {
],
component: null,
children: [],
hydration: null,
hydration: undefined,
changeDetection: 'ng-eager',
controlFlowBlock: null,
hasNativeElement: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const mockIndexedNode: IndexedNode = {
id: 0,
isElement: false,
},
hydration: null,
directives: [
{
id: 1,
Expand Down
Loading
Loading