Added check that database is available before joining a game

Fixes issue with joining a game already in progress on a browser with indexedDB disabled
This commit is contained in:
Mitchell McCaffrey
2020-10-23 21:11:25 +11:00
parent 5df01973e5
commit 6c8833feae
2 changed files with 7 additions and 3 deletions

View File

@@ -219,7 +219,6 @@ export function MapDataProvider({ children }) {
}
async function getMapFromDB(mapId) {
if (!database) return;
return await database.table("maps").get(mapId);
}