Fix bug in speaker
This commit is contained in:
parent
fbb9bea3c0
commit
649286dcdf
1 changed files with 4 additions and 2 deletions
|
@ -19,8 +19,10 @@ class Speaker {
|
||||||
} else {
|
} else {
|
||||||
if (!this.#scheduled.length) {
|
if (!this.#scheduled.length) {
|
||||||
queueMicrotask(() => {
|
queueMicrotask(() => {
|
||||||
for (let callback of this.#callbacks) {
|
for (let args of this.#scheduled) {
|
||||||
callback(...args)
|
for (let callback of this.#callbacks) {
|
||||||
|
callback(...args)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.#scheduled = []
|
this.#scheduled = []
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue