Skip to content

Commit 4ca16b2

Browse files
Fix missing classes
1 parent a630d58 commit 4ca16b2

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Html/Attributes.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,10 @@ public function isEmpty(): bool
8484

8585
public function toArray(): array
8686
{
87-
if (empty($this->classes) || empty($this->id)) {
88-
return $this->attributes;
89-
}
90-
91-
return array_merge($this->attributes, [
87+
return array_merge($this->attributes, array_filter([
9288
'class' => implode(' ', $this->classes),
93-
'id' => implode(' ', $this->id),
94-
]);
89+
'id' => $this->id,
90+
]));
9591
}
9692

9793
public function toString(): string

0 commit comments

Comments
 (0)