diff --git a/devtools/projects/ng-devtools/src/lib/shared/tree-visualizer-host/tree-visualizer.ts b/devtools/projects/ng-devtools/src/lib/shared/tree-visualizer-host/tree-visualizer.ts index 26bf3a22e93..a40e2bde3d2 100644 --- a/devtools/projects/ng-devtools/src/lib/shared/tree-visualizer-host/tree-visualizer.ts +++ b/devtools/projects/ng-devtools/src/lib/shared/tree-visualizer-host/tree-visualizer.ts @@ -313,7 +313,7 @@ export class TreeVisualizer extends GraphRenderer const debouncer = new Debouncer(); const resizeObserver = new ResizeObserver( debouncer.debounce(([entry]) => { - if (!entry || !this.snappedNode) { + if (!entry || !entry.contentRect.width || !entry.contentRect.height || !this.snappedNode) { return; } // Avoid executing the code on observer init.