Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Models/AbstractAttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ protected function value(): Attribute
return e(htmlspecialchars_decode($val), false);
}, Arr::wrap($value));

if (count($value) === 1) {
// NOTE: doing it this way properly returns null when there are no values
if (count($value) <= 1) {
return Arr::first($value);
}

Expand Down
Loading