Issue description
JS Error with the new version beta4 (worked fine on beta3) 馃憤
TypeError: Cannot read property 'extend' of undefined
at AgmMap.push../node_modules/@agm/core/directives/map.js.AgmMap._isLatLngBoundsLiteral (map.js:352)
at AgmMap.push../node_modules/@agm/core/directives/map.js.AgmMap._updateBounds (map.js:337)
at AgmMap.push../node_modules/@agm/core/directives/map.js.AgmMap._fitBounds (map.js:329)
at AgmMap.push../node_modules/@agm/core/directives/map.js.AgmMap._updatePosition (map.js:298)
at AgmMap.push../node_modules/@agm/core/directives/map.js.AgmMap.ngOnChanges (map.js:250)
at checkAndUpdateDirectiveInline (core.js:9239)
at checkAndUpdateNodeInline (core.js:10507)
at checkAndUpdateNode (core.js:10469)
at debugCheckAndUpdateNode (core.js:11102)
at debugCheckDirectivesFn (core.js:11062)
My page is quite complex so I can't give you a simple repro test case right now, but maybe there is no need as the bug seems to be the function _isLatLngBoundsLiteral that seems optimistic by not testing undefined/null prior to use it.
Ok,
I had a [fitBounds]="latLngBounds" which was now not-working because of the new breaking change API of
https://github.com/SebastianM/angular-google-maps/pull/1389
@jscti thanks for the report. The type guard is wrong here, it has to check if the value is undefined/null before checking the method. I will provide a fix for it asap
beta 5 is out