Apply corrections identified by SonarQube (#8457)
This commit is contained in:
@@ -136,7 +136,8 @@ export const getCurrentPosition = async (): Promise<GeolocationPosition> => {
|
||||
export type ClearWatchCallback = () => void;
|
||||
export const watchPosition = (
|
||||
onWatchPosition: PositionCallback,
|
||||
onWatchPositionError: (error: GeolocationError) => void): ClearWatchCallback => {
|
||||
onWatchPositionError: (error: GeolocationError) => void,
|
||||
): ClearWatchCallback => {
|
||||
try {
|
||||
const onError = (error) => onWatchPositionError(mapGeolocationError(error));
|
||||
const watchId = getGeolocation().watchPosition(onWatchPosition, onError, GeolocationOptions);
|
||||
|
||||
@@ -80,7 +80,9 @@ export const useOwnLiveBeacons = (liveBeaconIds: BeaconIdentifier[]): LiveBeacon
|
||||
};
|
||||
|
||||
const onResetLocationPublishError = () => {
|
||||
liveBeaconIds.map(beaconId => OwnBeaconStore.instance.resetLocationPublishError(beaconId));
|
||||
liveBeaconIds.forEach(beaconId => {
|
||||
OwnBeaconStore.instance.resetLocationPublishError(beaconId);
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user