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 @@ -2519,7 +2519,6 @@ export function attach(
25192519 }
25202520 }
25212521
2522- // TODO:
25232522 function recordSuspenseUnmount(suspenseInstance: SuspenseNode): void {
25242523 if (__DEBUG__) {
25252524 console.log(
@@ -2529,9 +2528,12 @@ export function attach(
25292528 );
25302529 }
25312530
2532- // TODO: We're not unmounting filtered instances anyway. Think about if we
2533- // can just use recordUnmount() for this as well.
2534- const id = ((suspenseInstance.instance: any): FiberInstance).id;
2531+ const devtoolsInstance = suspenseInstance.instance;
2532+ if (devtoolsInstance.kind !== FIBER_INSTANCE) {
2533+ throw new Error("Can't unmount a filtered SuspenseNode. This is a bug.");
2534+ }
2535+ const fiberInstance = devtoolsInstance;
2536+ const id = fiberInstance.id;
25352537
25362538 // To maintain child-first ordering,
25372539 // we'll push it into one of these queues,
You can’t perform that action at this time.
0 commit comments