Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.

Commit

Permalink
Fix AddFieldsToProductBlueprint when no variant option fields are c…
Browse files Browse the repository at this point in the history
…onfigured (#134)
  • Loading branch information
duncanmcclean authored Nov 16, 2023
1 parent 286e8fc commit a6b914f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Listeners/AddFieldsToProductBlueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function handle(EntryBlueprintFound $event)
if ($event->blueprint->hasField('product_variants')) {
$productVariantsField = $event->blueprint->field('product_variants');

$hasDigitalProductFields = collect($productVariantsField->config()['option_fields'])
$hasDigitalProductFields = collect($productVariantsField->config()['option_fields'] ?? [])
->filter(function ($value, $key) {
return $value['handle'] === 'download_limit' || $value['handle'] === 'downloadable_asset';
})
Expand Down

0 comments on commit a6b914f

Please sign in to comment.