Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
map((json: string) => {
try {
const res = JSON.parse(json);
const notepad: INotepad = Parser.restoreNotepad(res);
notepad.notepadAssets = res.notepadAssets;
return actions.parseNpx.done({
params: '',
result: notepad
});
} catch (err) {
alert(`Error restoring notepad`);
console.error(err);
return actions.parseNpx.failed({
params: '',
error: err
});
}
})
);