File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/react-devtools-shared/src/backend/fiber Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2479,7 +2479,6 @@ export function attach(
2479
2479
untrackFiber(fiberInstance, fiber);
2480
2480
}
2481
2481
2482
- // TODO:
2483
2482
function recordSuspenseUnmount(suspenseInstance: SuspenseNode): void {
2484
2483
if (__DEBUG__) {
2485
2484
console.log(
@@ -2489,9 +2488,12 @@ export function attach(
2489
2488
);
2490
2489
}
2491
2490
2492
- // TODO: We're not unmounting filtered instances anyway. Think about if we
2493
- // can just use recordUnmount() for this as well.
2494
- const id = ((suspenseInstance.instance: any): FiberInstance).id;
2491
+ const devtoolsInstance = suspenseInstance.instance;
2492
+ if (devtoolsInstance.kind !== FIBER_INSTANCE) {
2493
+ throw new Error("Can't unmount a filtered SuspenseNode. This is a bug.");
2494
+ }
2495
+ const fiberInstance = devtoolsInstance;
2496
+ const id = fiberInstance.id;
2495
2497
2496
2498
// To maintain child-first ordering,
2497
2499
// we'll push it into one of these queues,
You can’t perform that action at this time.
0 commit comments