File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,11 +59,7 @@ class GeoBreakdown {
5959 }
6060
6161 renderTable ( ) {
62- const container = document . getElementById ( `${ this . id } -table` ) ;
63- if ( ! this . geoData || ! this . geoData . length ) {
64- if ( container ) container . textContent = 'No geographic data available.' ;
65- return ;
66- }
62+ if ( ! this . geoData || ! this . geoData . length || this . geoData . length === 0 ) return ;
6763
6864 const component = document . querySelector ( `[data-id="${ this . id } "]` ) ;
6965 const client = component ?. dataset ?. client || 'mobile' ;
@@ -112,6 +108,7 @@ class GeoBreakdown {
112108 const limited = this . showAll ? sorted : sorted . slice ( 0 , 10 ) ;
113109 const entries = this . sortEntries ( limited ) ;
114110
111+ const container = document . getElementById ( `${ this . id } -table` ) ;
115112 if ( ! container ) return ;
116113
117114 const table = document . createElement ( 'table' ) ;
You can’t perform that action at this time.
0 commit comments