fix(dispatcher): fix not dispatching to children

i dont fucking know why that code didn't work, i hate js
This commit is contained in:
teidesu 2022-06-30 16:24:13 +03:00
parent fdcd9e0c5b
commit f2eb033e91

View file

@ -251,7 +251,8 @@ export class Dispatcher<State = never, SceneName extends string = string> {
} }
for (const child of this._children) { for (const child of this._children) {
handled ||= await child.dispatchRawUpdateNow(update, peers) const childHandled = await child.dispatchRawUpdateNow(update, peers)
handled ||= childHandled
} }
return handled return handled
@ -465,7 +466,8 @@ export class Dispatcher<State = never, SceneName extends string = string> {
if (shouldDispatchChildren) { if (shouldDispatchChildren) {
for (const child of this._children) { for (const child of this._children) {
handled ||= await child._dispatchUpdateNowImpl(update) const childHandled = await child._dispatchUpdateNowImpl(update)
handled ||= childHandled
} }
} }