Skip to content

Commit

Permalink
fix: srcset disable option
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Meilick <b@bnomei.com>
  • Loading branch information
bnomei committed Aug 21, 2019
1 parent 009d477 commit 5f18392
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions classes/Betterrest.php
Expand Up @@ -164,8 +164,10 @@ public function applySrcSet($value): array
{
$srcset = \Kirby\Toolkit\A::get($this->options, 'srcset');
if (! $srcset) {
// $value['srcset'] = null; // NOTE: not setting is better for frontend than `null`
return $value;
}

$file = $this->kirby->file($value['id']);
$value['srcset'] = $file->srcset($srcset);

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -2,7 +2,7 @@
"name": "robinscholz/better-rest",
"description": "Kirby Plugin for better REST requests",
"type": "kirby-plugin",
"version": "1.2.2",
"version": "1.2.3",
"license": "MIT",
"authors": [
{
Expand Down

0 comments on commit 5f18392

Please sign in to comment.