diff --git a/diff-so-fancy b/diff-so-fancy index e729b20..e982ba0 100755 --- a/diff-so-fancy +++ b/diff-so-fancy @@ -931,7 +931,7 @@ sub git_ansi_color { # It's a simple 16 color OG ansi } elsif ($fg) { my $bright = $fg =~ s/bright//; - my $color_num = $colors->{$fg} + 30; + my $color_num = ($colors->{$fg} // 0) + 30; if ($bright) { $color_num += 60; } # Set bold @@ -952,7 +952,7 @@ sub git_ansi_color { # It's a simple 16 color OG ansi } elsif ($bg) { my $bright = $bg =~ s/bright//; - my $color_num = $colors->{$bg} + 40; + my $color_num = ($colors->{$bg} // 0) + 40; if ($bright) { $color_num += 60; } # Set bold