mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(devtools): runtime errors caused by tree node snapping and tab change (#63531)
Fix the runtime errors caused by the tree visualizer node auto-snapping when a tab is changed. The errors are caused since we only visually hide the tabs. PR Close #63531
This commit is contained in:
+1
-1
@@ -313,7 +313,7 @@ export class TreeVisualizer<T extends TreeNode = TreeNode> 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.
|
||||
|
||||
Reference in New Issue
Block a user