Skip to content

Commit b9a0453

Browse files
authored
[DevTools] Allow inspecting root when navigating Suspense timeline (#34380)
1 parent e2cc315 commit b9a0453

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ function getSuspendableDocumentOrderSuspense(
4545
if (current === undefined) {
4646
continue;
4747
}
48-
// Don't include the root. It's currently not supported to suspend the shell.
49-
if (current !== suspense) {
50-
suspenseTreeList.push(current);
51-
}
48+
// Include the root even if we won't suspend it.
49+
// You should be able to see what suspended the shell.
50+
suspenseTreeList.push(current);
5251
// Add children in reverse order to maintain document order
5352
for (let j = current.children.length - 1; j >= 0; j--) {
5453
const childSuspense = store.getSuspenseByID(current.children[j]);
@@ -139,7 +138,7 @@ function SuspenseTimelineInput({rootID}: {rootID: Element['id'] | void}) {
139138

140139
const pendingValue = +event.currentTarget.value;
141140
const suspendedSet = timeline
142-
.slice(pendingValue + 1)
141+
.slice(pendingValue)
143142
.map(suspense => suspense.id);
144143

145144
bridge.send('overrideSuspenseMilestone', {

0 commit comments

Comments
 (0)