Skip to content

Commit ebb4d19

Browse files
frasertweedaleTristanCacqueray
authored andcommitted
lib: make references array optional
1 parent a82d53c commit ebb4d19

File tree

1 file changed

+3
-1
lines changed
  • code/hsec-tools/src/Security/Advisories

1 file changed

+3
-1
lines changed

code/hsec-tools/src/Security/Advisories/Parse.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ parseAdvisoryTable oob policy table doc summary details html = runTableParser $
184184
<$> optional advisory "related" (isArrayOf isString)
185185

186186
affected <- mandatory table "affected" (isArrayOf parseAffected)
187-
references <- mandatory table "references" (isArrayOf parseReference)
187+
references <-
188+
fromMaybe []
189+
<$> optional table "references" (isArrayOf parseReference)
188190

189191
pure $ Advisory
190192
{ advisoryId = identifier

0 commit comments

Comments
 (0)