Skip to content

Commit fbccaf4

Browse files
committed
check type of option
1 parent 38864db commit fbccaf4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/jblond/Diff/Renderer/Text/UnifiedCli.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function render(): string
4949
if (!isset($this->options['cliColor'])) {
5050
return $this->output();
5151
}
52-
if (isset($this->options['cliColor'])) {
52+
if (isset($this->options['cliColor']) && $this->options['cliColor'] === true) {
5353
return $this->output();
5454
}
5555
throw new InvalidArgumentException('Invalid cliColor option');
@@ -63,7 +63,7 @@ public function render(): string
6363
*/
6464
private function colorizeString($string, $color = ''): string
6565
{
66-
if (isset($this->options['cliColor'])) {
66+
if (isset($this->options['cliColor']) && $this->options['cliColor'] === true) {
6767
return $this->colors->getColoredString($string, $color);
6868
}
6969
return $string;

0 commit comments

Comments
 (0)