mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-16 06:42:14 +00:00
Editor.constructor was injecting <script src="jsm/libs/ammo.wasm.js"> into document.body and creating <div id="created-one-element"> on every construction. Strict mode + provider remounts produced duplicate tags; the div was unreferenced anywhere in the codebase. Replaced with a module-level Promise singleton (ammoLoader.ts) that appends the script exactly once. Existing tags (e.g. from a prior session) are detected and reused. The div is gone. This is a correctness cleanup, not a behavior change for first-mount — the script still loads on first Editor construction, just no longer duplicates on subsequent ones.