observablehq / oss-analytics

Open-source analytics
https://observablehq.observablehq.cloud/oss-analytics/
ISC License
11 stars 2 forks source link

findRelLink does not work with cached headers #8

Closed Fil closed 3 weeks ago

Fil commented 3 weeks ago

https://github.com/observablehq/oss-analytics/blob/96b2248a435b0e01352eeb5a9cdd78ab1da5258a/src/github.js#L70

this breaks if the headers are taken from the cache; I think the following works in both cases:

-  return headers
-    .get("link")
+  headers = { ...headers };
+  return headers["link"]
mbostock commented 3 weeks ago

Fixed in 2ed5e5bf96a42a0af869d968e06d9ec057741786.