lib/ogo/image_info.rb in ogo-0.1.1 vs lib/ogo/image_info.rb in ogo-0.1.2
- old
+ new
@@ -44,10 +44,12 @@
@type ||= \
if defined?(FastImage)
fi_check(:type, url).to_s
else
uri = Addressable::URI.parse(url).normalize
- uri.path.split('.').last.to_s
+ if uri.path.include?('.')
+ uri.path.split('.').last.to_s
+ end
end
end
def fetch_type!
@type = nil