Skip to content

Commit ea0e841

Browse files
committed
Fix epoch filter strict equality mismatch with numeric frontmatter values
fmParseScalarValue converts numeric-looking YAML values to JS numbers, but filter_epoch from the zod schema is always a string. Wrap the frontmatter epoch in String() so strict equality works regardless of the parsed type.
1 parent 0b75140 commit ea0e841

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

workers/src/orchestrate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ async function runCatalog(
665665
// Server-side epoch filter — deterministic, cheap, correct
666666
if (filter_epoch) {
667667
candidates = candidates.filter(
668-
(e) => e.frontmatter && (e.frontmatter as Record<string, unknown>).epoch === filter_epoch,
668+
(e) => e.frontmatter && String((e.frontmatter as Record<string, unknown>).epoch) === filter_epoch,
669669
);
670670
}
671671

0 commit comments

Comments
 (0)