Skip to content

Commit

Permalink
only remove if client still exists
Browse files Browse the repository at this point in the history
  • Loading branch information
rodja committed Aug 30, 2024
1 parent ce0e587 commit 1b07870
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nicegui/elements/timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,5 @@ def _should_stop(self) -> bool:
def _cleanup(self) -> None:
self.callback = None
assert self.parent_slot
self.parent_slot.parent.remove(self)
if not self.client._deleted: # pylint: disable=protected-access
self.parent_slot.parent.remove(self)

0 comments on commit 1b07870

Please sign in to comment.