diff --git a/src/_internal.tsx b/src/_internal.tsx index 3da26c1..e6af34a 100644 --- a/src/_internal.tsx +++ b/src/_internal.tsx @@ -117,7 +117,16 @@ const SENSITIVITY: Record = ({ level, className }) => { - const s = SENSITIVITY[level]; + // A row can arrive without a sensitivity (e.g. a claim/note, or older data); + // fall back to a neutral badge rather than crash — and never default an + // unknown value to "Open", which would misstate its exposure. + const s = + SENSITIVITY[level] ?? { + label: level ?? "—", + tone: "bg-muted text-muted-foreground", + icon: null, + title: "Sensitivity not set.", + }; return ( {s.label}