CEC-3595-invalid-locations (#276)
* CEC-3595-invalid-locations * fix ci * added validate function * resolve comments:
This commit is contained in:
@@ -7,6 +7,7 @@ import { Button } from "@material-ui/core";
|
||||
import { useUserContext } from "../Contexts/UserContext";
|
||||
import { useVehicleContext, VehicleProvider } from "../Contexts/VehicleContext";
|
||||
import { VehiclePopUp } from "./popup";
|
||||
import { ValidateLocationData } from "../../utils/locations"
|
||||
import GreenMarkerIcon from "../../assets/green-marker.png";
|
||||
import GrayMarkerIcon from "../../assets/gray-marker.png";
|
||||
import { logger } from "../../services/monitoring";
|
||||
@@ -44,7 +45,7 @@ const Component = () => {
|
||||
const retrieveAndStoreLocations = (accessToken) => {
|
||||
return getLocations(accessToken)
|
||||
.then((result) => {
|
||||
if (result.data != null) {
|
||||
if (result.data != null && ValidateLocationData(result.data) !== false) {
|
||||
const points = result.data.map((point) => [
|
||||
point.latitude,
|
||||
point.longitude,
|
||||
|
||||
Reference in New Issue
Block a user