diff --git a/nicegui/client.py b/nicegui/client.py index 00b3610e7..c45c1528b 100644 --- a/nicegui/client.py +++ b/nicegui/client.py @@ -15,7 +15,6 @@ from . import background_tasks, binding, core, helpers, json from .awaitable_response import AwaitableResponse -from .context import get_client from .dependencies import generate_resources from .element import Element from .favicon import get_favicon_url diff --git a/nicegui/storage.py b/nicegui/storage.py index 8241c6f33..e92ac3d45 100644 --- a/nicegui/storage.py +++ b/nicegui/storage.py @@ -170,7 +170,7 @@ def clear(self) -> None: """Clears all storage.""" self._general.clear() self._users.clear() - if get_slot_stack() and not self._is_in_auto_index_context(): + if not self._is_in_auto_index_context() and get_slot_stack(): self.client.clear() for filepath in self.path.glob('storage-*.json'): filepath.unlink()