dependabot[bot]
2026-01-20 25a6747d7d63914c206d58d7d6ac3846d9934abe
quartz/components/scripts/util.ts
@@ -37,9 +37,10 @@
  if (!res.headers.get("content-type")?.startsWith("text/html")) {
    return res
  }
  // reading the body can only be done once, so we need to clone the response
  // to allow the caller to read it if it's was not a redirect
  const text = await res.clone().text()
  const [_, redirect] = text.match(canonicalRegex) ?? []
  return redirect ? fetch(redirect) : res
  return redirect ? fetch(`${new URL(redirect, url)}`) : res
}