Falko Schindler 1 gadu atpakaļ
vecāks
revīzija
33702b3396
2 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 1 1
      nicegui/element.py
  2. 1 0
      nicegui/functions/timer.py

+ 1 - 1
nicegui/element.py

@@ -357,6 +357,6 @@ class Element(Visibility):
         outbox.enqueue_delete(self)
 
     @property
-    def is_deleted(self) -> None:
+    def is_deleted(self) -> bool:
         """Whether the element has been deleted."""
         return self._deleted

+ 1 - 0
nicegui/functions/timer.py

@@ -114,6 +114,7 @@ class Timer:
             return False
 
     def _should_stop(self) -> bool:
+        assert self.slot is not None
         return (
             self.slot.parent.is_deleted or
             self.slot.parent.client.id not in globals.clients or