Skip to content

Commit

Permalink
fix(baseline): catch computeBaseline() error (#11636)
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner authored Aug 15, 2024
1 parent 570efab commit 1735372
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions build/web-features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ export function addBaseline(doc: Partial<Doc>) {
function getStatuses(bcdKey: string) {
for (const feature of Object.values(features)) {
if (feature.status && feature.compat_features?.includes(bcdKey)) {
return {
featureStatus: feature.status,
keyStatus: computeBaseline({ compatKeys: [bcdKey] }),
};
try {
return {
featureStatus: feature.status,
keyStatus: computeBaseline({ compatKeys: [bcdKey] }),
};
} catch (e) {
console.error(e);
}
}
}
return {};
Expand Down

0 comments on commit 1735372

Please sign in to comment.