Skip to content

Commit

Permalink
fix: Sort by value, not by key for variantSourceWidths
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jun 17, 2024
1 parent 21d1e53 commit 70f134b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/OptimizedImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ protected function getSrcsetSubsetArray(array $set, int $width, string $comparis
}
// Sort the arrays by numeric key
ksort($set, SORT_NUMERIC);
ksort($this->variantSourceWidths, SORT_NUMERIC);
sort($this->variantSourceWidths, SORT_NUMERIC);
foreach ($this->variantSourceWidths as $variantSourceWidth) {
$match = false;
switch ($comparison) {
Expand Down

0 comments on commit 70f134b

Please sign in to comment.