diff --git a/lib/babushka/core_patches/array.rb b/lib/babushka/core_patches/array.rb index 53c76ec07..b02c6a07d 100644 --- a/lib/babushka/core_patches/array.rb +++ b/lib/babushka/core_patches/array.rb @@ -151,7 +151,7 @@ def to_list(opts = {}) [ items[0..-2].compact.join(', '), items.last - ].compact.join("#{',' if opts[:oxford]} #{opts[:conj] || 'and'} ") + ].reject(&:blank?).join("#{',' if opts[:oxford]} #{opts[:conj] || 'and'} ") end # If the final element of the array is a +Hash+, it's removed from this array