File tree Expand file tree Collapse file tree 1 file changed +22
-22
lines changed
packages/react-devtools-shared/src/devtools/views/SuspenseTab Expand file tree Collapse file tree 1 file changed +22
-22
lines changed Original file line number Diff line number Diff line change @@ -39,28 +39,6 @@ function SuspenseTimelineInput() {
3939 const min = 0 ;
4040 const max = timeline . length > 0 ? timeline . length - 1 : 0 ;
4141
42- if ( rootID === null ) {
43- return (
44- < div className = { styles . SuspenseTimelineInput } > No root selected.</ div >
45- ) ;
46- }
47-
48- if ( ! store . supportsTogglingSuspense ( rootID ) ) {
49- return (
50- < div className = { styles . SuspenseTimelineInput } >
51- Can't step through Suspense in production apps.
52- </ div >
53- ) ;
54- }
55-
56- if ( timeline . length === 0 ) {
57- return (
58- < div className = { styles . SuspenseTimelineInput } >
59- Root contains no Suspense nodes.
60- </ div >
61- ) ;
62- }
63-
6442 function switchSuspenseNode ( nextTimelineIndex : number ) {
6543 const nextSelectedSuspenseID = timeline [ nextTimelineIndex ] ;
6644 highlightHostInstance ( nextSelectedSuspenseID ) ;
@@ -175,6 +153,28 @@ function SuspenseTimelineInput() {
175153 } ;
176154 } , [ playing ] ) ;
177155
156+ if ( rootID === null ) {
157+ return (
158+ < div className = { styles . SuspenseTimelineInput } > No root selected.</ div >
159+ ) ;
160+ }
161+
162+ if ( ! store . supportsTogglingSuspense ( rootID ) ) {
163+ return (
164+ < div className = { styles . SuspenseTimelineInput } >
165+ Can't step through Suspense in production apps.
166+ </ div >
167+ ) ;
168+ }
169+
170+ if ( timeline . length === 0 ) {
171+ return (
172+ < div className = { styles . SuspenseTimelineInput } >
173+ Root contains no Suspense nodes.
174+ </ div >
175+ ) ;
176+ }
177+
178178 return (
179179 < >
180180 < Button
You can’t perform that action at this time.
0 commit comments