Commit 1be653b7 authored by Boris Bügling's avatar Boris Bügling

Do not try to validate nil screenshots.

parent ae244a6f
...@@ -272,7 +272,7 @@ module Pod ...@@ -272,7 +272,7 @@ module Pod
# Performs validation related to the `screenshots` attribute. # Performs validation related to the `screenshots` attribute.
# #
def validate_screenshots(spec) def validate_screenshots(spec)
spec.screenshots.each do |screenshot| spec.screenshots.compact.each do |screenshot|
request = validate_url(screenshot) request = validate_url(screenshot)
if request && !(request.headers['content-type'] && request.headers['content-type'].first =~ /image\/.*/i) if request && !(request.headers['content-type'] && request.headers['content-type'].first =~ /image\/.*/i)
warning "The screenshot #{screenshot} is not a valid image." warning "The screenshot #{screenshot} is not a valid image."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment