You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My app crashes and getting a weird error message in the console from the agm-direction library when hitting the "back" button of the browser (only tested in Chrome).
My map is in a lazy-loaded module, and all agm-* related components are in a single component that is in that lazy-loaded module.
Below is the message in the console:
TypeError: Cannot read property 'setPanel' of undefined
at AgmDirection.push../node_modules/agm-direction/fesm5/agm-direction.js.AgmDirection.removeDirections (agm-direction.js:306)
at AgmDirection.push../node_modules/agm-direction/fesm5/agm-direction.js.AgmDirection.ngOnDestroy (agm-direction.js:100)
at callProviderLifecycles (core.js:18860)
It seems like directionsDisplay is undefined when running the ngOnDestroy hook of the agm-direction directive?
Steps to reproduce the issue
Navigate to Angular app, home route
Click on a /map route that loads a lazy-loaded module containing the agm-direction directive
Click on the back button of the browser
App crashes: component disappears from DOM, route stays the same, and the error message above is logged in the console
There seems to be a bug in the ngOnDestroy hook of the agm-direction component
The text was updated successfully, but these errors were encountered:
vleput
changed the title
Destroy hook of agm-direction component fails on back browser button click
Destroy hook of agm-direction directive fails on back browser button click
May 6, 2019
Issue description
My app crashes and getting a weird error message in the console from the agm-direction library when hitting the "back" button of the browser (only tested in Chrome).
My map is in a lazy-loaded module, and all agm-* related components are in a single component that is in that lazy-loaded module.
Below is the message in the console:
It seems like
directionsDisplay
isundefined
when running thengOnDestroy
hook of the agm-direction directive?Steps to reproduce the issue
/map
route that loads a lazy-loaded module containing the agm-direction directiveWhat's the expected result?
What's the actual result?
The text was updated successfully, but these errors were encountered: