summaryrefslogtreecommitdiff
path: root/resources/js/db.js
diff options
context:
space:
mode:
Diffstat (limited to 'resources/js/db.js')
-rw-r--r--resources/js/db.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/resources/js/db.js b/resources/js/db.js
index ede65aa..f5cff6c 100644
--- a/resources/js/db.js
+++ b/resources/js/db.js
@@ -165,12 +165,15 @@ async function fetchTranslation (locale) {
* @returns {Promise<Area>}
*/
async function fetchArea (slug) {
+ if (Memory.state.areaProgress[slug]) {
+ return Memory.state.areaProgress[slug];
+ }
+
if (! DB.areas[slug]) {
DB.areas[slug] = await fetch(`/db/_generated/areas/${slug}.json`).then((response) => response.json());
}
const area = new Area(slug);
-
return area;
}