diff --git a/packages/edge/src/Component/ComponentTagCompiler.php b/packages/edge/src/Component/ComponentTagCompiler.php index 90cbdc3b3..ebcbe0251 100644 --- a/packages/edge/src/Component/ComponentTagCompiler.php +++ b/packages/edge/src/Component/ComponentTagCompiler.php @@ -315,10 +315,10 @@ public function partitionDataAndAttributes(string $class, array $attributes) foreach ($properties as $property) { $attrs = $property->getAttributes(Prop::class, \ReflectionAttribute::IS_INSTANCEOF); - foreach ($attrs as $attr) { + if ($attrs) { $propName = StrNormalize::toKebabCase($property->getName()); - if ($attributes[$propName] ?? null) { + if (array_key_exists($propName, $attributes)) { $props[$property->getName()] = $attributes[$propName]; unset($attributes[$propName]);