Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Paulo Gorgita committed Mar 19, 2021
1 parent 12204a5 commit cabce3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tty/table/orientation/vertical.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def slice(table)
header = table.header
rows_size = table.rows_size

head = header ? header : (0..rows_size).map { |n| (n + 1).to_s }
head = header ? header : (1..table.columns_count).map(&:to_s)

(0...rows_size).reduce([]) do |array, index|
array + head.zip(table.rows[index]).map { |row| table.to_row(row) }
Expand Down

0 comments on commit cabce3b

Please sign in to comment.