File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -678,7 +678,6 @@ function updateSummaryData(runOnce) {
678678 updateTopLists ( ) ;
679679 }
680680
681- var formatter = new Intl . NumberFormat ( ) ;
682681 //Element name might have a different name to the property of the API so we split it at |
683682 [
684683 "ads_blocked_today|queries_blocked_today" ,
@@ -691,9 +690,17 @@ function updateSummaryData(runOnce) {
691690 var apiName = apiElName [ 0 ] ;
692691 var elName = apiElName [ 1 ] ;
693692 var $todayElement = elName ? $ ( "span#" + elName ) : $ ( "span#" + apiName ) ;
694- // Round to one decimal place and format locale-aware
695- var text = formatter . format ( Math . round ( data [ apiName ] * 10 ) / 10 ) ;
696- var textData = idx === 2 && data [ apiName ] !== "to" ? text + "%" : text ;
693+
694+ var textData = data [ apiName ] ;
695+ if ( ! FTLoffline ) {
696+ // Only format as number if FTL is online
697+ var formatter = new Intl . NumberFormat ( ) ;
698+
699+ // Round to one decimal place and format locale-aware
700+ var text = formatter . format ( Math . round ( data [ apiName ] * 10 ) / 10 ) ;
701+ textData = idx === 2 && data [ apiName ] !== "to" ? text + "%" : text ;
702+ }
703+
697704 if ( $todayElement . text ( ) !== textData && $todayElement . text ( ) !== textData + "%" ) {
698705 $todayElement . addClass ( "glow" ) ;
699706 $todayElement . text ( textData ) ;
You can’t perform that action at this time.
0 commit comments