Skip to content

Commit 8a2166f

Browse files
committed
style
1 parent 24f0f28 commit 8a2166f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Illuminate/View/ComponentAttributeBag.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,11 @@ public function __toString()
495495
$value = $key === 'x-data' || str_starts_with($key, 'wire:') ? '' : $key;
496496
}
497497

498-
$string .= ' '.$key.'="'.str_replace('"', '\\"', trim($value)).'"';
498+
if ($key === $value) {
499+
$string .= ' '.$key;
500+
} else {
501+
$string .= ' '.$key.'="'.str_replace('"', '\\"', trim($value)).'"';
502+
}
499503
}
500504

501505
return trim($string);

0 commit comments

Comments
 (0)