Skip to content

Race condition corrupting JSON #3

Description

@mrginglymus

const formatted: Record<string, string> = {};
for (const [k, v] of Object.entries(mod.default)) {
formatted[k] = prettyJSON(JSON.parse(v));
}
setFiles(formatted);

On large token files (or large numbers thereof) this rewriting with reformatted json appears to trigger a race condition which causes the parseJSON in resolverFromFiles to barf on malformed JSON.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions