@fleetbase/fleetops-engine 0.4.7 → 0.4.8

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.
@@ -93,14 +93,16 @@ export default class LocationService extends Service {
93
93
 
94
94
  if (isArray(coordinates)) {
95
95
  const validCoordinates = coordinates.filter((point) => point.coordinates[0] !== 0);
96
- const [longitude, latitude] = getWithDefault(validCoordinates, '0.coordinates', [0, 0]);
97
- const coordinates = {
98
- latitude,
99
- longitude,
100
- };
101
-
102
- this.updateLocation(coordinates);
103
- return coordinates;
96
+ if (validCoordinates) {
97
+ const [longitude, latitude] = getWithDefault(validCoordinates, '0.coordinates', [0, 0]);
98
+ const userCoordinates = {
99
+ latitude,
100
+ longitude,
101
+ };
102
+
103
+ this.updateLocation(userCoordinates);
104
+ return userCoordinates;
105
+ }
104
106
  }
105
107
 
106
108
  return this.getUserLocationFromWhois();
package/composer.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbase/fleetops-api",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Fleet & Transport Management Extension for Fleetbase",
5
5
  "keywords": [
6
6
  "fleetbase-extension",
@@ -22,7 +22,7 @@
22
22
  ],
23
23
  "require": {
24
24
  "php": "^8.0",
25
- "fleetbase/core-api": "^1.4.0",
25
+ "fleetbase/core-api": "^1.4.1",
26
26
  "barryvdh/laravel-dompdf": "^2.0",
27
27
  "brick/geo": "0.7.2",
28
28
  "cknow/laravel-money": "^7.1",
package/extension.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "Fleet-Ops",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Fleet & Transport Management Extension for Fleetbase",
5
5
  "repository": "https://github.com/fleetbase/fleetops",
6
6
  "license": "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleetbase/fleetops-engine",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Fleet & Transport Management Extension for Fleetbase",
5
5
  "fleetbase": {
6
6
  "route": "fleet-ops"