Skip to content

Commit

Permalink
Return empty array if fetching data from DecapCMS fails
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinEtchells committed Sep 19, 2024
1 parent 5e987d4 commit a10da9c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/_data/blogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ async function getData(url) {
return (response.data);
} catch (error) {
console.error(`Error fetching for URL: ${url}`, error.message);
return [];
}
}

Expand Down

0 comments on commit a10da9c

Please sign in to comment.