From 382cb99a4cad3c5356284e89b5b45ca3afc7b646 Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Thu, 14 Oct 2021 19:39:24 +0800 Subject: [PATCH] bump v1.2.0 - minor patch on place resource --- package.json | 2 +- src/resources/place.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f285113..8fff54d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fleetbase/sdk", - "version": "1.1.9", + "version": "1.2.0", "description": "Fleetbase JS & Node SDK", "main": "dist/cjs/fleetbase.js", "module": "dist/esm/fleetbase.js", diff --git a/src/resources/place.js b/src/resources/place.js index c94ab11..4349207 100644 --- a/src/resources/place.js +++ b/src/resources/place.js @@ -34,7 +34,7 @@ class Place extends Resource { * @var {Integer} */ get latitude() { - return this.getAttribute('location', new Point()).coordinates[1]; + return this.getAttribute('location', new Point())?.coordinates[1]; } /** @@ -43,7 +43,7 @@ class Place extends Resource { * @var {Integer} */ get longitude() { - return this.getAttribute('location', new Point()).coordinates[0]; + return this.getAttribute('location', new Point())?.coordinates[0]; } /**