mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-02-19 06:41:31 +00:00
Fallback to Item.row when converting to Modal component list
Fix #10397
This commit is contained in:
@@ -223,7 +223,7 @@ class Modal(BaseView):
|
|||||||
|
|
||||||
def to_components(self) -> List[Dict[str, Any]]:
|
def to_components(self) -> List[Dict[str, Any]]:
|
||||||
def key(item: Item) -> int:
|
def key(item: Item) -> int:
|
||||||
return item._rendered_row or 0
|
return item._rendered_row or item.row or 0
|
||||||
|
|
||||||
children = sorted(self._children, key=key)
|
children = sorted(self._children, key=key)
|
||||||
components: List[Dict[str, Any]] = []
|
components: List[Dict[str, Any]] = []
|
||||||
|
|||||||
Reference in New Issue
Block a user