mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-15 10:47:06 +02:00
Stop writing empty section
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
parent
f29ff276b6
commit
00fcad0e1e
@ -56,7 +56,9 @@ class Fluentd
|
||||
next if section_params.blank?
|
||||
section_params.each do |index, _section_params|
|
||||
sub_attrs, sub_elements = parse_attributes(_section_params)
|
||||
elements << config_element(key, "", sub_attrs, sub_elements)
|
||||
if sub_attrs.present? || sub_elements.present? # skip empty section
|
||||
elements << config_element(key, "", sub_attrs, sub_elements)
|
||||
end
|
||||
end
|
||||
end
|
||||
return params.to_h.reject{|key, value| skip?(key.to_sym, value) }, elements
|
||||
|
Loading…
Reference in New Issue
Block a user