Reverted unnecessary changes to fix fake-indexeddb issue

This commit is contained in:
Mitchell McCaffrey
2020-10-24 09:05:16 +11:00
parent b59efda436
commit 05e66e5e82
3 changed files with 6 additions and 12 deletions
+2 -2
View File
@@ -247,8 +247,8 @@ function NetworkedMapAndTokens({ session }) {
if (cachedMap && cachedMap.lastModified >= newMap.lastModified) {
// Update last used for cache invalidation
const lastUsed = Date.now();
const updatedMap = await updateMap(cachedMap.id, { lastUsed });
setCurrentMap(updatedMap);
await updateMap(cachedMap.id, { lastUsed });
setCurrentMap({ ...cachedMap, lastUsed });
} else {
// Save map data but remove last modified so if there is an error
// during the map request the cache is invalid. Also add last used