Skip to content

Commit

Permalink
Merge pull request #4 from ucraft-com/fix-filter
Browse files Browse the repository at this point in the history
fix filter:
  • Loading branch information
miqayelsrapionyan authored Jun 6, 2024
2 parents eb54185 + 9742b14 commit a238162
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Strategies/FilterStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class FilterStrategy implements StrategyInterface
*/
public function convert(array $variantStyle): string
{
$property = 'filter:';
$property = '';

foreach ($variantStyle['value'] as $value) {
$filterType = $value['type'];
Expand All @@ -29,6 +29,6 @@ public function convert(array $variantStyle): string
$property .= " $filterType($filterValue)";
}

return $property.';';
return !empty($property) ? 'filter:'.$property.';' : '';
}
}

0 comments on commit a238162

Please sign in to comment.