Skip to content

Commit

Permalink
Merge pull request #58 from kyoto7250/issue_57
Browse files Browse the repository at this point in the history
fix: early return if headers is empty
  • Loading branch information
kyoto7250 authored Jun 17, 2024
2 parents c4687b2 + 23729ef commit e161dcd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,11 @@ impl App {
headers: Vec<String>,
header_icons: Option<Vec<String>>,
) -> Vec<String> {
// If there are no execution results, there is no header, so do not combine icons.
// This logic will not work properly if the number of columns changes in the future release.
if headers.is_empty() {
return headers;
}
if let Some(header_icons) = &header_icons {
let mut new_headers = vec![String::new(); headers.len()];
for (index, header) in headers.iter().enumerate() {
Expand Down

0 comments on commit e161dcd

Please sign in to comment.