more fixes

This commit is contained in:
MathMan05 2024-08-14 12:53:18 -05:00
parent 3cdb1bb8e1
commit a45188c1fc
2 changed files with 10 additions and 12 deletions

View file

@ -149,22 +149,21 @@ class Localuser {
w = ds.writable.getWriter();
r = ds.readable.getReader();
arr = new Uint8Array();
const textdecode = new TextDecoder();
(async () => {
let temp;
while (true) {
const read = (await r.read());
const data = new TextDecoder().decode(read.value);
const read = await r.read();
const data = textdecode.decode(read.value);
build += data;
try {
temp = JSON.parse(build);
const temp = JSON.parse(build);
build = "";
if (temp.op === 0 && temp.t === "READY") {
returny();
}
this.handleEvent(temp);
}
catch {
}
catch { }
}
})();
}