Important: Partner map draws on a late module load 

Description 

The partner map did not draw on most page loads. The container stayed empty, no tiles, no markers, and nothing was reported anywhere - not in the browser console, not in the TYPO3 log.

Resources/Private/TypeScript/frontend/map.ts bound its whole body to document.addEventListener('DOMContentLoaded', ...) without asking whether that event was still ahead of it.

f:asset.module renders every module with async : the ViewHelper accepts an identifier and nothing else, and \TYPO3\CMS\Core\Page\JavaScriptRenderer writes the attribute unconditionally. An async module is not ordered against document parsing, so it regularly runs after DOMContentLoaded has already fired. The listener was then registered on an event that never comes again.

The module now runs its initialisation immediately when the document has finished parsing, and waits only while it has not:

if (document.readyState === 'loading') {
    document.addEventListener('DOMContentLoaded', initializeMap, { once: true });
} else {
    initializeMap();
}
Copied!

That is the shape the other frontend modules of this repository already use. This was the only one missing it.

Impact 

The map draws on every load. Nothing about its markup, its configuration or its data changed, and an installation that saw the map draw before - the load where the module happened to win the race - sees no difference.

Affected Installations 

Every installation rendering the Partners Map plugin, or a template that includes the map module.