Closed
Description
Hey there,
We're getting this error intermittently when trying to load the GoogleMaps Api.
It looks like what's happening is that asyncScriptLoaderTriggerOnScriptLoaded
is being called before the script onLoad
event fires. Only happens about once in 5 refreshes.
I have a workaround that feels kind of hacky. It just ignores mapEntry.loaded
if callbackName
is defined.
asyncScriptLoaderTriggerOnScriptLoaded() {
let mapEntry = SCRIPT_MAP.get(scriptURL);
const { callbackName } = options;
if (!mapEntry || !mapEntry.loaded && !callbackName) {
throw new Error("Script is not loaded.");
}
I'd be happy to help out with this. Not sure what the right direction to go is though.
Metadata
Metadata
Assignees
Labels
No labels