release: v4.1.0

This commit is contained in:
Amruth Pillai
2024-05-05 14:55:06 +02:00
parent 68252c35fc
commit e87b05a93a
282 changed files with 11461 additions and 10713 deletions

View File

@ -33,19 +33,22 @@ export class JsonResumeParser implements Parser<Json, JsonResume> {
return new Promise((resolve, reject) => {
const reader = new FileReader();
// eslint-disable-next-line unicorn/prefer-add-event-listener
reader.onload = () => {
try {
const result = JSON.parse(reader.result as string) as Json;
resolve(result);
} catch (error) {
} catch {
reject(new Error("Failed to parse JSON"));
}
};
// eslint-disable-next-line unicorn/prefer-add-event-listener
reader.onerror = () => {
reject(new Error("Failed to read the file"));
};
// eslint-disable-next-line unicorn/prefer-blob-reading-methods
reader.readAsText(file);
});
}