Skip to content

Commit

Permalink
fix: use correct breakpoint data in srcset rendering #8
Browse files Browse the repository at this point in the history
  • Loading branch information
simonerd committed Jan 31, 2024
1 parent b5890d1 commit bcb3641
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Picturesque.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,8 @@ private function makeSourcesForBreakpoints(): array
$format = $breakpoint[1];
$breakpoint = (string) $breakpoint[0];

if ($this->breakpoints->get($breakpoint)) {
return $this->makeSource(
$px, $format, $breakpoint
);
if ($srcData = $this->breakpoints->get($breakpoint)) {
return $this->makeSource($srcData, $format, $breakpoint);
}
})
->filter()
Expand Down

0 comments on commit bcb3641

Please sign in to comment.