Skip to content

Commit 11e546f

Browse files
committed
Fix crash when no / empty validator defined
1 parent 1448c4e commit 11e546f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/media_types/constructable.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ def validate!(output, **validation_opts)
125125
end
126126

127127
def validatable?
128+
return false if media_type_combinations.nil?
128129
return false unless media_type_combinations.include? as_key
129130

130131
__getobj__.validatable?(self)

0 commit comments

Comments
 (0)