setCenter returns error on go back: InvalidValueError #2911
Unanswered
Mspellman2195
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I inherited an application from a team that is using this package to display a map w/ markers on it. My issue is that when i click on something on the page and then return via the back button the map fails to reload with the below error:
InvalidValueError: setCenter: not a LatLng or LatLngLiteral with finite coordinates: not an Object
This is the onLoad function i'm using w/ the
GoogleMap
component.searchState
here is the variable representing an object being passed from a context provider that is holding the current location data the map should display. For some reason on page return searchState isn't being populated which is causing the error.Will try to recreate this issue in codesandbox and update this with the link...
Beta Was this translation helpful? Give feedback.
All reactions