Skip to content

Commit

Permalink
Merge pull request #2 from visuellverstehen/make-sure-if-data-provide…
Browse files Browse the repository at this point in the history
…d-is-already-of-type-asset

chore: make sure provided data is already of type asset
  • Loading branch information
juliawarnke authored May 30, 2023
2 parents 8652b7a + a1c0b89 commit 2fd1be3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Tags/Picture.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ public function __call($method, $args): string

protected function output($asset)
{
if (! $asset = Asset::find($asset)) {
return '';
if (! is_a($asset, 'Statamic\Contracts\Assets\Asset')) {
if (! $asset = Asset::find($asset)) {
return '';
}
}

$picture = new Picturesque($asset);
Expand Down

0 comments on commit 2fd1be3

Please sign in to comment.