From 0e8f1ab75ea9f0acb46cc9dc1ff6972f3e8ed329 Mon Sep 17 00:00:00 2001 From: Martyn McDonnell Date: Fri, 30 Nov 2018 21:54:33 +1100 Subject: [PATCH] fix(AgmMap): _updateBounds not creating newBounds object (#1553) A new LatLngBounds object is required to use the union method immediately afterwards --- packages/core/directives/map.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/directives/map.ts b/packages/core/directives/map.ts index 9b805f8d3..02362188f 100644 --- a/packages/core/directives/map.ts +++ b/packages/core/directives/map.ts @@ -476,7 +476,7 @@ export class AgmMap implements OnChanges, OnInit, OnDestroy { protected _updateBounds(bounds: LatLngBounds|LatLngBoundsLiteral) { if (this._isLatLngBoundsLiteral(bounds) && google && google.maps) { - const newBounds = google.maps.LatLngBounds(); + const newBounds = new google.maps.LatLngBounds(); newBounds.union(bounds); bounds = newBounds; }