Fix undefined method `sort_by' error from vhost_location_empty.erb
In the template, we should check if the variable is defined before use it
This commit is contained in:
parent
9c7712a190
commit
b6fb7ae54f
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
location <%= @location %> {
|
||||
<% @location_custom_cfg.sort_by {|k,v| k}.each do |key,value| -%>
|
||||
<% if @location_custom_cfg -%><% @location_custom_cfg.sort_by {|k,v| k}.each do |key,value| -%>
|
||||
<%= key %> <%= value %>;
|
||||
<% end -%>
|
||||
<% end -%><% end -%>
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue