mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-29 12:53:44 +03:00
Handle empty list properly in buttons
This commit is contained in:
parent
fa736f81af
commit
c3188ff0fa
|
@ -48,7 +48,7 @@ class ButtonMethods:
|
|||
|
||||
if not utils.is_list_like(buttons):
|
||||
buttons = [[buttons]]
|
||||
elif not utils.is_list_like(buttons[0]):
|
||||
elif not buttons or not utils.is_list_like(buttons[0]):
|
||||
buttons = [buttons]
|
||||
|
||||
is_inline = False
|
||||
|
|
Loading…
Reference in New Issue
Block a user