diff --git a/src/hooks/internal-hooks.ts b/src/hooks/internal-hooks.ts index 522406e5d7a..fcc46806132 100644 --- a/src/hooks/internal-hooks.ts +++ b/src/hooks/internal-hooks.ts @@ -297,7 +297,10 @@ export async function triggerInternalHook(event: InternalHookEvent): Promise { + // Default to empty array for legacy callers that construct hook events + // without the postHookActions field (pre-dates this PR's event shape change). + const actions = event.postHookActions ?? []; + await drainPostHookActions(actions, (err) => { const message = err instanceof Error ? err.message : String(err); log.error(`Post-hook action error [${event.type}:${event.action}]: ${message}`); });