[Refactor] Minor cleanup of initExpKeys (#6127)

This commit is contained in:
Bertie690 2025-07-25 19:39:25 -04:00 committed by GitHub
parent 7b7edbb474
commit ab394db9cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -699,16 +699,16 @@ export class BattleScene extends SceneBase {
if (expSpriteKeys.size > 0) { if (expSpriteKeys.size > 0) {
return; return;
} }
this.cachedFetch("./exp-sprites.json") const res = await this.cachedFetch("./exp-sprites.json");
.then(res => res.json()) const keys = await res.json();
.then(keys => { if (!Array.isArray(keys)) {
if (Array.isArray(keys)) { throw new Error("EXP Sprites were not array when fetched!");
for (const key of keys) { }
expSpriteKeys.add(key);
} // TODO: Optimize this
} for (const k of keys) {
Promise.resolve(); expSpriteKeys.add(k);
}); }
} }
/** /**