Found a nicer way to handle the too long IndirectObjCoordinates for Object Navigation

This commit is contained in:
Tissevert 2020-03-18 15:07:50 +01:00
parent 44125f75a6
commit 1eb1c23053
1 changed files with 2 additions and 2 deletions

View File

@ -39,8 +39,8 @@ type Component = String
getDictionary :: PDFContent m => Object -> m Dictionary
getDictionary (Direct (Dictionary aDict)) = return aDict
getDictionary (Direct (Reference (IndirectObjCoordinates {objectId}))) =
objectById objectId >>= getDictionary
getDictionary (Direct (Reference ref)) =
objectById (objectId ref) >>= getDictionary
getDictionary (Stream {header}) = return header
getDictionary obj = expected "dictionary : " obj