@sumaris-net/ngx-components 2.4.66 → 2.4.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/src/app/shared/geolocation/geolocation.utils.mjs +4 -4
- package/fesm2015/sumaris-net.ngx-components.mjs +4 -3
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +3 -3
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -21681,10 +21681,10 @@ class GeolocationUtils {
|
|
|
21681
21681
|
try {
|
|
21682
21682
|
const permissions = await Geolocation.checkPermissions();
|
|
21683
21683
|
console.error(`[geolocation-utils] Permissions: ${JSON.stringify(permissions)})`);
|
|
21684
|
-
const
|
|
21685
|
-
|
|
21684
|
+
const permissionDenied = (permissions?.coarseLocation || permissions?.location) === 'denied'
|
|
21685
|
+
|| (err?.message?.indexOf('Location permission was denied') !== -1);
|
|
21686
|
+
if (permissionDenied)
|
|
21686
21687
|
throw { ...err, code: GeolocationPositionError.PERMISSION_DENIED };
|
|
21687
|
-
}
|
|
21688
21688
|
}
|
|
21689
21689
|
catch (e2) {
|
|
21690
21690
|
console.error(`[geolocation-utils] Error while calling checkPermissions(): ${err?.message || ''}`);
|