Skip to content

Commit

Permalink
Removed imports, simplified client availability check
Browse files Browse the repository at this point in the history
  • Loading branch information
Alyxion committed Apr 7, 2024
1 parent 08d73bd commit 06d6393
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion nicegui/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion nicegui/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 06d6393

Please sign in to comment.