fix(core): use a queue to process events in event routes (#18259)

This commit is contained in:
James Long
2026-03-19 13:51:14 -04:00
committed by GitHub
parent baa204193c
commit 0540751897
4 changed files with 123 additions and 83 deletions

View File

@@ -51,8 +51,8 @@ export namespace Bus {
})
const pending = []
for (const key of [def.type, "*"]) {
const match = state().subscriptions.get(key)
for (const sub of match ?? []) {
const match = [...(state().subscriptions.get(key) ?? [])]
for (const sub of match) {
pending.push(sub(payload))
}
}