Skip to content

Commit

Permalink
Fall back to null if nothing is selected.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed Aug 18, 2020
1 parent 31de0e1 commit 703e84e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Fieldtypes/Terms.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function process($data)
})->all();

if ($this->field->get('max_items') === 1) {
return $data[0];
return $data[0] ?? null;
}
}

Expand Down

0 comments on commit 703e84e

Please sign in to comment.