Skip to content

Commit

Permalink
Persist quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnw committed Jul 11, 2024
1 parent bf99830 commit 99b38a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/_data/newsletterArchive.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ export default async () => {
directory: '.cache/eleventy-fetch/',
dryRun: false,
});
const archives = res.replace(/^document.write\("/, '').replace(/"\);$/, '');
const archives = res.replace(/^document.write\(/, '').replace(/\);$/, '');

try {
return JSON.parse(`"${archives}"`);
return JSON.parse(archives);
} catch (e) {
// eslint-disable-next-line no-console
console.error('Failed fetching OddNews archive.', e);
Expand Down

0 comments on commit 99b38a8

Please sign in to comment.