Skip to content

Commit

Permalink
fix: use promise allSettled instead of all
Browse files Browse the repository at this point in the history
  • Loading branch information
dzehnder committed Aug 23, 2024
1 parent 7c4cd2f commit eade28a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
21 changes: 0 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/structured-data/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ export async function processStructuredData(baseURL, context, pages) {
}
});

return Promise.all(urlInspectionResult);
const results = await Promise.allSettled(urlInspectionResult);
return results
.filter((result) => result.status === 'fulfilled')
.map((result) => result.value);
}

export async function structuredDataHandler(baseURL, context, site) {
Expand Down

0 comments on commit eade28a

Please sign in to comment.