File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/react-reconciler/src Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -90,8 +90,13 @@ function popComponentEffectStart(prevEffectStart: number): void {
9090 if ( ! enableProfilerTimer || ! enableProfilerCommitHooks ) {
9191 return ;
9292 }
93- // If the parent component didn't have a start time, we let this current time persist.
94- if ( prevEffectStart >= 0 ) {
93+ if ( prevEffectStart < 0 ) {
94+ // If the parent component didn't have a start time, we use the start
95+ // of the child as the parent's start time. We subtrack a minimal amount of
96+ // time to ensure that the parent's start time is before the child to ensure
97+ // that the performance tracks line up in the right order.
98+ componentEffectStartTime -= 0.001 ;
99+ } else {
95100 // Otherwise, we restore the previous parent's start time.
96101 componentEffectStartTime = prevEffectStart ;
97102 }
You can’t perform that action at this time.
0 commit comments