File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
src/view/components/profiler/components/CommitInfo Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -9,20 +9,17 @@ export function CommitInfo() {
9
9
const commit = useObserver ( ( ) => store . profiler . activeCommit . $ ) ;
10
10
const isRecording = useObserver ( ( ) => store . profiler . isRecording . $ ) ;
11
11
12
- if ( commit === null || isRecording ) {
12
+ if ( commit === null || ! commit . rendered . length || isRecording ) {
13
13
return null ;
14
14
}
15
15
16
- const root = commit . nodes . get ( commit . commitRootId ) ! ;
17
- if ( ! root ) {
18
- return null ;
19
- }
16
+ const startTime = commit . nodes . get ( commit . rendered [ 0 ] ) ?. startTime || 0 ;
20
17
21
18
return (
22
19
< SidebarPanel title = "Commit Stats" >
23
20
< dl class = { s . list } >
24
21
< dt class = { s . title } > Start:</ dt >
25
- < dd class = { s . value } > { formatTime ( root . startTime ) } </ dd >
22
+ < dd class = { s . value } > { formatTime ( startTime ) } </ dd >
26
23
< br />
27
24
< dt class = { s . title } > Duration:</ dt >
28
25
< dd class = { s . value } > { formatTime ( commit . duration ) } </ dd >
You can’t perform that action at this time.
0 commit comments