Skip to content

Commit 061693f

Browse files
committed
fix typing
1 parent 34312ee commit 061693f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nicegui/storage.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,9 @@ async def _create_tab_storage(self, tab_id: str) -> None:
165165
if tab_id not in self._tabs:
166166
if Storage.redis_url:
167167
self._tabs[tab_id] = Storage._create_persistent_dict(f'tab-{tab_id}')
168-
assert isinstance(self._tabs[tab_id], PersistentDict)
169-
await self._tabs[tab_id].initialize()
168+
tab = self._tabs[tab_id]
169+
if isinstance(tab, PersistentDict):
170+
await tab.initialize()
170171
else:
171172
self._tabs[tab_id] = ObservableDict()
172173

0 commit comments

Comments
 (0)