core: bug fixes

This commit is contained in:
undefined committed 2022-10-06 02:53:22 +08:00
1 parent 5d340608db
commit 2daa7e2034
11 files changed
+36 -34

No files matched your search

+1 -1
View File
@@ -186,7 +186,7 @@ export async function apply(ctx: Context) {
const stream = collEvent.watch();
const handleEvent = async (doc: EventDoc) => {
const payload = JSON.parse(doc.payload);
if (process.send) process.send({ type: 'hydro:broadcast', data: { event: doc.event, payload } });
process.send?.({ type: 'hydro:broadcast', data: { event: doc.event, payload } });
await (bus.parallel as any)(doc.event, ...payload);
};
stream.on('change', async (change) => {