Handle empty list properly in buttons

This commit is contained in:
Lonami Exo 2019-12-23 14:49:40 +01:00
parent fa736f81af
commit c3188ff0fa

View File

@ -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