You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tighten enrichedMetadata to drop redundant ?? [] guards #80
Spotted by PR #79's review: src/pages/dataset/[id].astro builds enrichedMetadata with recording_modality: metadata.recording_modality ?? [] (and same for tasks, authors). The NeuroschemaDataset type already declares these as non-optional string[] / Author[] (see src/lib/neuroschema.ts:68,71,79), so the coalesces are dead code by type.
Two ways to clean up:
(a) Verify the live API actually never omits these (curl a handful of data.nemar.org/<id>/metadata.json responses), then drop ?? [] from [id].astro.
(b) If any deployed metadata.json files DO omit them, widen the type to recording_modality?: string[] and keep the guard.
Defaulting to (a) since the post-#717 backfill landed all 130 datasets at schema 1.1 — option (b) only if the curl finds counterexamples.
Picked up here rather than in #79 because changing the type ripples through DetailRail and might surface other consumers that quietly relied on the array being always-defined.
Activity