Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lesleyrs committed Jul 21, 2024
1 parent 3e986c8 commit 46201b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/public/LoginThread.js
Original file line number Diff line number Diff line change
Expand Up @@ -18975,9 +18975,9 @@ if (typeof self === "undefined" && parentPort) {
} else {
let save = new Uint8Array();
const safeName = toSafeName(username);
const url = new URL(`data/players/${safeName}.sav`, self.location.origin);
if ((await fetch(url)).ok) {
save = new Uint8Array(await (await fetch(url)).arrayBuffer());
const saveFile = await fetch(`data/players/${safeName}.sav`);
if (saveFile.ok) {
save = new Uint8Array(await saveFile.arrayBuffer());
}
self.postMessage({
type: "loginreply",
Expand Down

0 comments on commit 46201b3

Please sign in to comment.