Skip to content

Commit

Permalink
fix(AgmMap): _updateBounds not creating newBounds object (#1553)
Browse files Browse the repository at this point in the history
A new LatLngBounds object is required to use the union method immediately afterwards
  • Loading branch information
subshock authored and sebholstein committed Nov 30, 2018
1 parent facf0d0 commit 0e8f1ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/directives/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <LatLngBounds>google.maps.LatLngBounds();
const newBounds = new google.maps.LatLngBounds();
newBounds.union(bounds);
bounds = newBounds;
}
Expand Down

0 comments on commit 0e8f1ab

Please sign in to comment.