Skip to content

Commit 3f3ce62

Browse files
committed
Fix attr
1 parent 33c4cbb commit 3f3ce62

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Html/Editor/Fields/Field.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,10 @@ public function opts(array $value): static
340340
*/
341341
public function attr(string $attribute, int|bool|string $value): static
342342
{
343+
if (! isset($this->attributes['attr'])) {
344+
$this->attributes['attr'] = [];
345+
}
346+
343347
$attributes = (array) $this->attributes['attr'];
344348
$attributes[$attribute] = $value;
345349

0 commit comments

Comments
 (0)