Skip to content

Commit

Permalink
fix(view): extra null check for node attributes (#740)
Browse files Browse the repository at this point in the history
  • Loading branch information
brendt authored Nov 15, 2024
1 parent 2f9ff52 commit 5fa27bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tempest/View/src/Elements/ElementFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private function makeElement(DOMNode $node, ?Element $parent): ?Element
$attributes = [];

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

$attributes[$name] = $attribute->value;
Expand Down

0 comments on commit 5fa27bc

Please # to comment.