fix(time-context): preserve empty pre-step decisions

This commit is contained in:
pku-xht
2026-08-06 20:09:06 +08:00
committed by Tianyi Cui
parent cd59acd6f6
commit 32c6866adf
7 changed files with 51 additions and 18 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ import {
} from './request-zone.ts'
export type { ClientTimeZoneContext } from './request-zone.ts'
export { deriveClientTimeZoneContext, renderTimeZoneContext } from './request-zone.ts'
export { deriveClientTimeZoneContext } from './request-zone.ts'
/** Cordis plugin name used by loader diagnostics. */
export const name = 'time-context'
@@ -241,7 +241,7 @@ export function apply(ctx: Context, config: Config): () => void {
if (wasDisposed()) return next()
const decision = await next()
if (wasDisposed() || wasAborted() || decision.kind === 'reject'
|| (step === 1 && decision.messages.length === 0)) {
|| decision.messages.length === 0) {
return decision
}
const now = Date.now()