Skip to content

Commit

Permalink
Fix component attribute bool - windwalker-io/core#1250
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Dec 14, 2024
1 parent 23a3b94 commit 87b4371
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/edge/src/Component/ComponentTagCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 87b4371

Please sign in to comment.