Commit 1730675
committed
fix(example): resolve race between async Maps callback and deferred ESM module
Google Maps loaded with async+callback could fire before the type=module script assigned window.initApp, leaving the map blank. Stub initApp as a promise resolver synchronously, await it inside the module.1 parent 06ffb4f commit 1730675
1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
399 | 406 | | |
400 | 407 | | |
401 | 408 | | |
| |||
414 | 421 | | |
415 | 422 | | |
416 | 423 | | |
417 | | - | |
| 424 | + | |
| 425 | + | |
418 | 426 | | |
419 | 427 | | |
420 | 428 | | |
| |||
493 | 501 | | |
494 | 502 | | |
495 | 503 | | |
496 | | - | |
| 504 | + | |
497 | 505 | | |
498 | 506 | | |
499 | 507 | | |
0 commit comments