We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8698aa commit cca0fa3Copy full SHA for cca0fa3
client/my-sites/stats/geochart/index.jsx
@@ -500,8 +500,7 @@ const StatsGeochartWrapper = ( props ) => {
500
const userCountryCode = useSelector( getCurrentUserCountryCode );
501
502
// Use geo location fallback if user country code is not available
503
- const geoLocationReady = ! isGeoLocationLoading && geoCountryCode;
504
- const finalCountryCode = userCountryCode || geoLocationReady || null;
+ const finalCountryCode = userCountryCode ?? (isGeoLocationLoading ? null : geoCountryCode);
505
506
return <ConnectedStatsGeochart { ...props } currentUserCountryCode={ finalCountryCode } />;
507
};
0 commit comments