Fix another error with fake-indexeddb
This commit is contained in:
parent
623db9cf0e
commit
58b70a46de
@ -229,7 +229,13 @@ export function MapDataProvider({ children }) {
|
||||
}
|
||||
|
||||
async function getMapFromDB(mapId) {
|
||||
return await database.table("maps").get(mapId);
|
||||
let map = await database.table("maps").get(mapId);
|
||||
// Check state maps if not in database as a work around for the fake-indexeddb error
|
||||
// TODO: remove this when the error if fixed
|
||||
if (!map) {
|
||||
map = getMap(mapId);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
const ownedMaps = maps.filter((map) => map.owner === userId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user