Skip to content

Commit

Permalink
Parse opacity only from color value array
Browse files Browse the repository at this point in the history
fixes #100
  • Loading branch information
bsweeney committed Feb 23, 2024
1 parent 732faa9 commit 4350dce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Svg/Style.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ protected function fillStyles($styles)
$value = $this->color;
}
}
if ($value !== null && $value[3] !== 1 && array_key_exists("{$from}-opacity", $style_map) === true) {
if (is_array($value) && $value[3] !== 1 && array_key_exists("{$from}-opacity", $style_map) === true) {
$styles["{$from}-opacity"] = $value[3];
}
break;
Expand Down

0 comments on commit 4350dce

Please sign in to comment.