Skip to content

Commit 202bfbf

Browse files
authored
fix(components): double-yield in Section.walk_components (#3271)
1 parent 772ab09 commit 202bfbf

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

discord/components.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -850,10 +850,9 @@ def to_dict(self) -> SectionComponentPayload:
850850
return payload
851851

852852
def walk_components(self) -> Iterator[Component]:
853-
r = self.components
853+
yield from self.components
854854
if self.accessory:
855-
yield from r + [self.accessory]
856-
yield from r
855+
yield self.accessory
857856

858857
def get_component(self, id: str | int) -> Component | None:
859858
"""Get a component from this section. Roughly equivalent to `utils.get(section.walk_components(), ...)`.

0 commit comments

Comments
 (0)