Skip to content

Commit ef555ee

Browse files
committed
Update Component.php
1 parent e62aa8c commit ef555ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Discord/Parts/Interactions/Request/Component.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ protected function getComponentsAttribute(): ?ExCollectionInterface
9494
$components = Collection::for(Component::class, null);
9595

9696
foreach ($this->attributes['components'] ?? [] as $component) {
97-
$componentType = $component->type ?? 0;
97+
$componentType = (is_object($component)) ? (isset($component->type) ? $component->type : 0) : ($component['type'] ?? 0);
9898
$components->pushItem(
9999
$this->createOf(
100100
isset(ComponentBuilder::TYPE_CLASSES[$componentType])

0 commit comments

Comments
 (0)