Closed mediaessenz closed 7 months ago
This should fix the error. Maybe you can test it?
Why not using the DOMContentLoaded event?
This event is fired exact at that time when the DOM content is loaded. This way it is not neccecarey to check the readystate in a loop ...
Thanks for your feedback. What about this solution? The problem is, that it can be that the event was already triggered and the API and so the callback function was not loaded.
So I have to check both, the DOM is ready and the API was loaded.
Just changing setTimeout with a DOMContentLoaded listener will not work imo. How do you load the api code?
I wrote you a message via Slack. Maybe we can chat there
Any updates on this? The proposed fix sadly doesn't work for me as it introduces a new error:
Uncaught (in promise) TypeError: this.gme is undefined
Did you test the current main branch?
I didn't.
We extended gomapsext.js
, so I just tried pasting the fix into that file.
Will test again using the updated branch and report back.
we have the same problem:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'initialize')
Please use the current version 6.1.1
Sometimes it happens, that a map is not shown and this error appears in the js console: Uncaught (in promise) TypeError: getGoMapsExtControllerById(...) is undefined
I think it's a timing problem, if cached js is used or not.
I could imagine, that this can be fixed by wrapping the
getGoMapsExtControllerById(el.id).initialize();
call in a DOMContentLoaded event listener like so: