samvera / iiif_manifest

Other
10 stars 10 forks source link

Update guard clause to avoid NoMethodError #104

Closed masaball closed 10 months ago

masaball commented 10 months ago

The #populate method in the V3 canvas builder performs a collect on the input. This caused a NoMethodError to be generated when the input was nil. Changing the guard clause to check for respond_to? and present? should fix this case.

This commit also changes the if check in #display_content to a guard clause to match the style in #annotation_content.