File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -122,12 +122,12 @@ class TracePerf {
122122 this . INP ( ) ;
123123 this . CLS ( ) ;
124124 setTimeout ( ( ) => {
125- this . coreWebMetrics . fmpTime = Math . floor ( FMP . fmpTime ) || 0 ;
125+ this . coreWebMetrics . fmpTime = isNaN ( FMP . fmpTime ) ? - 1 : Math . floor ( FMP . fmpTime ) ;
126126 } , 5000 ) ;
127127 }
128128 private CLS ( ) {
129129 if ( ! isLayoutShiftSupported ( ) ) {
130- return this . coreWebMetrics . clsTime = 0 ;
130+ return this . coreWebMetrics . clsTime = - 1 ;
131131 }
132132 let partValue = 0 ;
133133 let entryList : LayoutShift [ ] = [ ] ;
@@ -169,7 +169,7 @@ class TracePerf {
169169 }
170170 private LCP ( ) {
171171 if ( ! isLargestContentfulPaintSupported ( ) ) {
172- return this . coreWebMetrics . lcpTime = 0 ;
172+ return this . coreWebMetrics . lcpTime = - 1 ;
173173 }
174174 prerenderChangeListener ( ( ) => {
175175 const visibilityObserver = getVisibilityObserver ( ) ;
You can’t perform that action at this time.
0 commit comments