Skip to content

Commit

Permalink
Fix eslint error in utils
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Tinland committed Aug 8, 2024
1 parent 49667c3 commit a26bfa4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ export function parseJson(json) {
try {
// clean up JSON that contains escape sequences,
// such as: `\\` or with `\"`
let cleanedJson = json
.replace(/\\/g, "\\\\")
.replace(/\\\"/g, '"');
let cleanedJson = json.replace(/\\/g, "\\\\").replace(/\\"/g, '"');
return JSON.parse(cleanedJson);
} catch (error) {
// eslint-disable-next-line no-console
Expand Down

0 comments on commit a26bfa4

Please sign in to comment.