Fix error with link_to when options are nil
This commit is contained in:
parent
3ec36ce07b
commit
a33ef20726
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue