GoogleApiWrapper in different components with different keys do not update the script tag
YoonKin opened this issue · 1 comments
Good day. Currently, we have two components that call GoogleApiWrapper - UserMap and InteractiveMap. UserMap is showing an embedded map API that uses a key without access to Google Maps JavaScript API. While InteractiveMap is calling the Google Maps JavaScript API with another key.
The problem is that when I navigate to a page with UserMap first, a script tag with the embedded API key will be created on the DOM, and when I navigate to the page with InteractiveMap, the script tag on the DOM is not updated to use the new key, resulting in the error.
However, if I navigate to the page with InteractiveMap first, no exception is thrown to navigate to the page with UserMap later.
Is there a way to have GoogleApiWrapper to update the script tag on a new component with a different key?
Realize that I don't need GoogleApiWrapper for the embed map API, so this is not really a problem. Closing the issue.