Skip to content

Commit

Permalink
fix: ClassificationStoreSetter doesn't handle empty groups correctly (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarlovi committed Jan 13, 2023
1 parent 36254a0 commit 5052c08
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function set(SetterContextInterface $context): void
if ($classificationStore instanceof Classificationstore) {
$groups = $classificationStore->getActiveGroups();

if (!$groups[$groupConfig]) {
if (!($groups[$groupConfig] ?? false)) {
$groups[$groupConfig] = true;
$classificationStore->setActiveGroups($groups);
}
Expand All @@ -63,7 +63,7 @@ public function get(GetterContextInterface $context)
if ($classificationStore instanceof Classificationstore) {
$groups = $classificationStore->getActiveGroups();

if (!$groups[$groupConfig]) {
if (!($groups[$groupConfig] ?? false)) {
$groups[$groupConfig] = true;
$classificationStore->setActiveGroups($groups);
}
Expand Down

0 comments on commit 5052c08

Please sign in to comment.