Skip to content

Commit

Permalink
This might not always return a string.
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed Nov 8, 2024
1 parent 12121c0 commit 5f5ac87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/WordPress/Gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public static function toBard(array $config, Blueprint $blueprint, Field $field,
'type' => 'gallery',
'images' => collect($block['innerBlocks'])
->filter(fn ($block) => $block['blockName'] === 'core/image')
->map(function (array $block) use ($config, $field): string {
->map(function (array $block) use ($config, $field): ?string {
$crawler = new Crawler($block['innerHTML']);
$url = $crawler->filter('img')->first()->attr('src');

Expand Down

0 comments on commit 5f5ac87

Please sign in to comment.