zeon-studio / astroplate

Astroplate is a free starter template built with Astro, TailwindCSS & TypeScript providing everything you need to jumpstart your Astro project. Get started with Astroplate and save yourself hours of work!
https://zeon.studio/preview?project=astroplate
MIT License
576 stars 176 forks source link

gmpx-api-loader is being loaded twice #51

Open mattcanty opened 1 month ago

mattcanty commented 1 month ago

I wonder if someone experienced with Astro might be able to help me with an issue I have been having using this template.

No matter which way I try to add in a Map using Google Maps Javascript API, I get this issue after adding <gpmx-api-loader>...

image

Note that when a page is refreshed the issue goes away and I can get a map to render perfectly.

I've reduced the changes to the codebase to a minimum to show the root ~cause~ of the issue:

https://github.com/Control-Alt-Repeat/website/blob/40f16eda4366eefd5c44bbaa40b97fccafec867a/src/layouts/Base.astro#L186-L187