Skip to content

Commit 915272e

Browse files
committed
wip
1 parent 6434de3 commit 915272e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/Fields/URL.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,11 @@ public function resolveFormat(Request $request, Model $model): ?string
8484
return $value;
8585
}
8686

87-
$attributes = array_merge($this->linkAttributes, [
88-
'href' => $value,
89-
'title' => $value,
90-
'data-turbo' => $this->isExternal($value) ? 'false' : null,
91-
'target' => $this->isExternal($value) ? '_blank' : ($this->linkAttributes['target'] ?? null),
92-
]);
87+
$attributes = array_merge(
88+
$this->linkAttributes,
89+
['href' => $value, 'title' => $value],
90+
$this->isExternal($value) ? ['data-turbo' => 'false', 'target' => '_blank'] : []
91+
);
9392

9493
$attributes = array_map(
9594
static function (string|Closure|null $attribute, string $name) use ($request, $model, $value): string {

0 commit comments

Comments
 (0)