Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
KATT committed Oct 7, 2023
1 parent ef8fad3 commit 68e8ff6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/sync/deserialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ export function createTsonParser(opts: TsonOptions): TsonParseFn {
}

return ((str: string) => {
const ret = deserializer(JSON.parse(str) as TsonSerialized);
let nonce = "";
JSON.parse(str, (key, value) => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return JSON.parse(str, (key, value) => {
if (!nonce && key === "_nonce") {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
nonce = value;
Expand All @@ -88,6 +88,5 @@ export function createTsonParser(opts: TsonOptions): TsonParseFn {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return value;
});
return ret;
}) as TsonParseFn;
}

0 comments on commit 68e8ff6

Please sign in to comment.