Skip to content

Commit

Permalink
[1.x] Fix type error when variants config is null (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
caseydwyer authored Feb 5, 2024
1 parent 29bb0e7 commit 98232f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Fieldtypes/MinisetClassesFieldtype.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function preload()
'existing' => collect($this->field->value())->mapWithKeys(function ($group) {
return [$group['_id'] => $this->fields()->addValues($group)->meta()];
})->toArray(),
'variant_indexes' => array_flip(array_keys($this->config('variants'))),
'variant_indexes' => array_flip(array_keys($this->config('variants') ?? [])),
];
}

Expand Down

0 comments on commit 98232f5

Please sign in to comment.