@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.
@@ -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 permissionStatus = permissions?.coarseLocation || permissions?.location;
21685
- if (permissionStatus === 'denied') {
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 || ''}`);