Skip to content

Commit 0c44b96

Browse files
authored
[DevTools] Remove spurious warnings when creating Suspense timeline from a Transition (#36133)
1 parent 1b45e24 commit 0c44b96

File tree

1 file changed

+4
-4
lines changed
  • packages/react-devtools-shared/src/devtools

1 file changed

+4
-4
lines changed

packages/react-devtools-shared/src/devtools/store.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,12 +1015,12 @@ export default class Store extends EventEmitter<{
10151015
): void {
10161016
for (let i = 0; i < children.length; i++) {
10171017
const childID = children[i];
1018-
const suspense = this.getSuspenseByID(childID);
1019-
if (suspense !== null) {
1018+
const suspense = this._idToSuspense.get(childID);
1019+
if (suspense !== undefined) {
10201020
target.push(suspense.id);
10211021
} else {
1022-
const childElement = this.getElementByID(childID);
1023-
if (childElement !== null) {
1022+
const childElement = this._idToElement.get(childID);
1023+
if (childElement !== undefined) {
10241024
this._pushSuspenseChildrenInDocumentOrder(
10251025
childElement.children,
10261026
target,

0 commit comments

Comments
 (0)