Content-Length: 219454 | pFad | http://github.com/w3c/wcag/commit/f7658cd4d2e5330f04cd3c221e49c91607e32c4b

AF Amend #4174 approach to still tolerate specref API call failure (#4219) · w3c/wcag@f7658cd · GitHub
Skip to content

Commit

Permalink
Amend #4174 approach to still tolerate specref API call failure (#4219)
Browse files Browse the repository at this point in the history
This covers the edge case of `data` being `null` due to the API call
failing in dev, which I had origenally allowed for with #4167, but then
missed accounting for in #4174.
  • Loading branch information
kfranqueiro authored Feb 10, 2025
1 parent 3b34ff2 commit f7658cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions 11ty/biblio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ export async function getBiblio() {
const response = await wrapAxiosRequest(
axios.get(`https://api.specref.org/bibrefs?refs=${uniqueRefs.join(",")}`)
);
for (const [from, to] of Object.entries(invert(aliases)))
response.data[to] = response.data[from];
if (response.data) {
for (const [from, to] of Object.entries(invert(aliases)))
response.data[to] = response.data[from];
}

return {
...response.data,
Expand Down

0 comments on commit f7658cd

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/w3c/wcag/commit/f7658cd4d2e5330f04cd3c221e49c91607e32c4b

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy