lib/lit/import.rb in lit-1.0 vs lib/lit/import.rb in lit-1.0.1
- old
+ new
@@ -156,10 +156,10 @@
if row.first == accu.last&.first # equal keys
accu.tap do
accu[-1] = [
row.first,
*accu[-1].drop(1)
- .map { |x| Array.wrap(x) }
+ .map { |x| Array.wrap(x).presence || [x] }
.zip(row.drop(1)).map(&:flatten)
]
end
else
accu << row