diff options
Diffstat (limited to 'src/state/geolocation.tsx')
-rw-r--r-- | src/state/geolocation.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/state/geolocation.tsx b/src/state/geolocation.tsx index 83a42f21d..20b161ffe 100644 --- a/src/state/geolocation.tsx +++ b/src/state/geolocation.tsx @@ -25,6 +25,7 @@ const onGeolocationUpdate = ( */ export const DEFAULT_GEOLOCATION: Device['geolocation'] = { countryCode: undefined, + isAgeRestrictedGeo: false, } async function getGeolocation(): Promise<Device['geolocation']> { @@ -39,6 +40,7 @@ async function getGeolocation(): Promise<Device['geolocation']> { if (json.countryCode) { return { countryCode: json.countryCode, + isAgeRestrictedGeo: json.isAgeRestrictedGeo ?? false, } } else { return undefined @@ -66,7 +68,9 @@ export function beginResolveGeolocation() { */ if (__DEV__) { geolocationResolution = new Promise(y => y({success: true})) - device.set(['geolocation'], DEFAULT_GEOLOCATION) + if (!device.get(['geolocation'])) { + device.set(['geolocation'], DEFAULT_GEOLOCATION) + } return } |