mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-11 21:58:37 +00:00
immediately remove click listener
This commit is contained in:
parent
5c9a16bc88
commit
c20e84773b
@ -72,9 +72,9 @@ export async function initAudioOnFirstClick(options) {
|
||||
if (!audioReady) {
|
||||
audioReady = new Promise((resolve) => {
|
||||
document.addEventListener('click', async function listener() {
|
||||
document.removeEventListener('click', listener);
|
||||
await initAudio(options);
|
||||
resolve();
|
||||
document.removeEventListener('click', listener);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user