contextController: fix hydration again
This commit is contained in:
parent
eead178c6a
commit
18d3363b65
|
@ -215,17 +215,22 @@ const contextController: AppController = async (c) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event) {
|
if (event) {
|
||||||
const [ancestors, descendants] = await Promise.all([
|
const [ancestorEvents, descendantEvents] = await Promise.all([
|
||||||
getAncestors(store, event).then(renderStatuses),
|
getAncestors(store, event),
|
||||||
getDescendants(store, event.id).then(renderStatuses),
|
getDescendants(store, event.id),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
await hydrateEvents({
|
await hydrateEvents({
|
||||||
events: [...ancestors, ...descendants],
|
events: [...ancestorEvents, ...descendantEvents],
|
||||||
signal: c.req.raw.signal,
|
signal: c.req.raw.signal,
|
||||||
store,
|
store,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const [ancestors, descendants] = await Promise.all([
|
||||||
|
renderStatuses(ancestorEvents),
|
||||||
|
renderStatuses(descendantEvents),
|
||||||
|
]);
|
||||||
|
|
||||||
return c.json({ ancestors, descendants });
|
return c.json({ ancestors, descendants });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue