Fix error with link_to when options are nil

This commit is contained in:
Ben Hollis 2013-01-08 19:40:50 -08:00
parent 3ec36ce07b
commit a33ef20726

View file

@ -176,15 +176,14 @@ module Middleman
end
end
end
end
# Support a :query option that can be a string or hash
query = options.delete(:query)
if query
if query = options.delete(:query)
uri = URI(args[url_arg_index])
uri.query = query.respond_to?(:to_param) ? query.to_param : query.to_s
args[url_arg_index] = uri.to_s
end
end
super(*args, &block)
end