Skip to content

Commit

Permalink
Update builder.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mchilvers committed Apr 8, 2024
1 parent d703e5f commit fee970e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/tools/builder/src/python/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,11 @@ def _manage_empty_element_in_container(self, container):
Manage an element shown when the container is empty.
"""

container.element.classList.remove("invent-empty")
if hasattr(container, "_empty_element"):
container._empty_element.remove()
delattr(container, "_empty_element")

if len(container.content) == 0:
container._empty_element = document.createElement("div")
container._empty_element.style.textAlign = "center"
Expand All @@ -662,12 +667,6 @@ def _manage_empty_element_in_container(self, container):

container.element.appendChild(container._empty_element)

else:
container.element.classList.remove("invent-empty")
if hasattr(container, "_empty_element"):
container._empty_element.remove()
delattr(container, "_empty_element")

for item in container.content:
if item.is_container:
self._manage_empty_element_in_container(item)

0 comments on commit fee970e

Please sign in to comment.