From f5313372effa8923559f67da716b4c3d9caf6e57 Mon Sep 17 00:00:00 2001 From: Shean de Montigny-Desautels Date: Wed, 3 Jul 2024 09:10:13 -0400 Subject: [PATCH] fix: handle zero as a valid value for marker position --- src/marker-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/marker-utils.ts b/src/marker-utils.ts index a28f3b5b..cacc8708 100644 --- a/src/marker-utils.ts +++ b/src/marker-utils.ts @@ -58,7 +58,7 @@ export class MarkerUtils { return marker.position; } // since we can't cast to LatLngLiteral for reasons =( - if (marker.position.lat && marker.position.lng) { + if (marker.position.lat != null && marker.position.lng != null) { return new google.maps.LatLng( marker.position.lat, marker.position.lng