mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-12-01 22:03:46 +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):
|
if not utils.is_list_like(buttons):
|
||||||
buttons = [[buttons]]
|
buttons = [[buttons]]
|
||||||
elif not utils.is_list_like(buttons[0]):
|
elif not buttons or not utils.is_list_like(buttons[0]):
|
||||||
buttons = [buttons]
|
buttons = [buttons]
|
||||||
|
|
||||||
is_inline = False
|
is_inline = False
|
||||||
|
|
Loading…
Reference in New Issue
Block a user