Skip to content

Commit 44f8451

Browse files
authored
[DevTools] Avoid tearing Suspense store (facebook#34294)
1 parent ad4ecb6 commit 44f8451

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/react-devtools-shared/src/devtools/views/SuspenseTab/SuspenseRects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function SuspenseRects({
5555

5656
const suspense = store.getSuspenseByID(suspenseID);
5757
if (suspense === null) {
58-
console.warn(`<Element> Could not find suspense node id ${suspenseID}`);
58+
// getSuspenseByID will have already warned
5959
return null;
6060
}
6161

packages/react-devtools-shared/src/devtools/views/SuspenseTab/SuspenseTreeContext.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function SuspenseTreeContextController({children}: Props): React.Node {
8181

8282
useEffect(() => {
8383
const handleSuspenseTreeMutated = () => {
84-
transitionDispatch({
84+
dispatch({
8585
type: 'HANDLE_SUSPENSE_TREE_MUTATION',
8686
});
8787
};
@@ -91,7 +91,7 @@ function SuspenseTreeContextController({children}: Props): React.Node {
9191
// At the moment, we can treat this as a mutation.
9292
// We don't know which Elements were newly added/removed, but that should be okay in this case.
9393
// It would only impact the search state, which is unlikely to exist yet at this point.
94-
transitionDispatch({
94+
dispatch({
9595
type: 'HANDLE_SUSPENSE_TREE_MUTATION',
9696
});
9797
}

0 commit comments

Comments
 (0)