[DevTools] Avoid tearing Suspense store (#34294)

This commit is contained in:
Sebastian "Sebbie" Silbermann
2025-08-26 17:09:55 +02:00
committed by GitHub
parent 00aa04c37d
commit cf78fcfb3b
2 changed files with 3 additions and 3 deletions
@@ -55,7 +55,7 @@ function SuspenseRects({
const suspense = store.getSuspenseByID(suspenseID);
if (suspense === null) {
console.warn(`<Element> Could not find suspense node id ${suspenseID}`);
// getSuspenseByID will have already warned
return null;
}
@@ -81,7 +81,7 @@ function SuspenseTreeContextController({children}: Props): React.Node {
useEffect(() => {
const handleSuspenseTreeMutated = () => {
transitionDispatch({
dispatch({
type: 'HANDLE_SUSPENSE_TREE_MUTATION',
});
};
@@ -91,7 +91,7 @@ function SuspenseTreeContextController({children}: Props): React.Node {
// At the moment, we can treat this as a mutation.
// We don't know which Elements were newly added/removed, but that should be okay in this case.
// It would only impact the search state, which is unlikely to exist yet at this point.
transitionDispatch({
dispatch({
type: 'HANDLE_SUSPENSE_TREE_MUTATION',
});
}