CEC-4955 - Digital twin to show vehicle location instead of vehicle paths (#426)
* CEC-4955 - Digital twin show vehicle location * fix code smell
This commit is contained in:
@@ -64,13 +64,14 @@ const ComponentVehiclePathsMap = (props) => {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
await getState(token, vinLocations[0]).then((stateResult) => {
|
||||
if (stateResult.data && stateResult.data.location) {
|
||||
if (ValidateLocationData(stateResult.data.location) !== false) {
|
||||
path[1].push([stateResult.data.location.latitude, stateResult.data.location.longitude]);
|
||||
await getState(accessToken, vinLocations[0])
|
||||
.then(async (stateResult) => {
|
||||
if (stateResult.data?.location) {
|
||||
if (ValidateLocationData(stateResult.data.location) !== false) {
|
||||
path[1].push([stateResult.data.location.latitude, stateResult.data.location.longitude]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
points.push(path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user