Skip to content

Commit 6434de3

Browse files
committed
wip
1 parent b1a8226 commit 6434de3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Fields/URL.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,12 @@ public function resolveFormat(Request $request, Model $model): ?string
9393

9494
$attributes = array_map(
9595
static function (string|Closure|null $attribute, string $name) use ($request, $model, $value): string {
96-
return match (true) {
96+
$attribute = (string) match (true) {
9797
$attribute instanceof Closure => call_user_func_array($attribute, [$request, $model, $value]),
98-
default => sprintf('%s="%s"', $name, (string) $attribute),
98+
default => $attribute,
9999
};
100+
101+
return sprintf('%s="%s"', $name, $attribute);
100102
},
101103
array_values($attributes),
102104
array_keys($attributes)

0 commit comments

Comments
 (0)