Skip to content

Commit

Permalink
Add another check for empty accordion buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
huong-li-nguyen committed Oct 2, 2023
1 parent 4167464 commit d5d0b16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vizro-core/src/vizro/models/_navigation/_accordion.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def _create_accordion_item(self, accordion_buttons, title=ACCORDION_DEFAULT_TITL
)

def _get_accordion_container(self, accordion_items, accordion_buttons):
# Return no container if there is only one page in the dashboard
if len(accordion_buttons) == len(accordion_items) == 1:
# Return no container if there is only one page in the dashboard or no pages exist
if (len(accordion_buttons) == len(accordion_items) == 1) or not accordion_buttons:
return None

return html.Div(
Expand Down

0 comments on commit d5d0b16

Please sign in to comment.