File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -79,21 +79,17 @@ class TTIMetric extends Audit {
7979 const fMPts = timings . fMPfull + timings . navStart ;
8080
8181 // look at speedline results for 85% starting at FMP
82- let eightyFivePctVC ;
8382 let visuallyReadyTiming = 0 ;
8483
8584 if ( artifacts . Speedline . frames ) {
86- eightyFivePctVC = artifacts . Speedline . frames . find ( frame => {
85+ const eightyFivePctVC = artifacts . Speedline . frames . find ( frame => {
8786 return frame . getTimeStamp ( ) >= fMPts && frame . getProgress ( ) >= 85 ;
8887 } ) ;
8988
90- // Check to avoid closure compiler null dereferencing errors
91- if ( eightyFivePctVC === undefined ) {
92- eightyFivePctVC = 0 ;
89+ if ( eightyFivePctVC ) {
90+ // TODO CHECK these units are the same
91+ visuallyReadyTiming = eightyFivePctVC . getTimeStamp ( ) - timings . navStart ;
9392 }
94-
95- // TODO CHECK these units are the same
96- visuallyReadyTiming = eightyFivePctVC . getTimeStamp ( ) - timings . navStart || 0 ;
9793 }
9894
9995 // Find first 500ms window where Est Input Latency is <50ms at the 90% percentile.
You can’t perform that action at this time.
0 commit comments