Skip to content

Commit 5fa27bc

Browse files
authored
fix(view): extra null check for node attributes (#740)
1 parent 2f9ff52 commit 5fa27bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Tempest/View/src/Elements/ElementFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private function makeElement(DOMNode $node, ?Element $parent): ?Element
5555
$attributes = [];
5656

5757
/** @var DOMAttr $attribute */
58-
foreach ($node->attributes as $attribute) {
58+
foreach ($node->attributes ?? [] as $attribute) {
5959
$name = str($attribute->name)->camel()->toString();
6060

6161
$attributes[$name] = $attribute->value;

0 commit comments

Comments
 (0)