From 061693f1cfbd809a68eae2b53f12694123a83ef1 Mon Sep 17 00:00:00 2001 From: Rodja Trappe Date: Sun, 9 Feb 2025 04:46:37 +0100 Subject: [PATCH] fix typing --- nicegui/storage.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nicegui/storage.py b/nicegui/storage.py index 284417cc5..b0e46e922 100644 --- a/nicegui/storage.py +++ b/nicegui/storage.py @@ -165,8 +165,9 @@ async def _create_tab_storage(self, tab_id: str) -> None: if tab_id not in self._tabs: if Storage.redis_url: self._tabs[tab_id] = Storage._create_persistent_dict(f'tab-{tab_id}') - assert isinstance(self._tabs[tab_id], PersistentDict) - await self._tabs[tab_id].initialize() + tab = self._tabs[tab_id] + if isinstance(tab, PersistentDict): + await tab.initialize() else: self._tabs[tab_id] = ObservableDict()