moebooru: fix delegation to nil strategy (fixup for 5cf6a43).

This commit is contained in:
evazion
2018-11-04 15:24:22 -06:00
parent c7e6c2a44a
commit 0152cbe39e

View File

@@ -17,7 +17,7 @@ module Sources
def self.find(url, referer=nil, default: Strategies::Null)
strategy = all.map { |strategy| strategy.new(url, referer) }.detect(&:match?)
strategy || default.new(url, referer)
strategy || default&.new(url, referer)
end
def self.canonical(url, referer)