Skip to content

Commit 505dc04

Browse files
committed
ugh
1 parent 01a6a6e commit 505dc04

File tree

1 file changed

+4
-4
lines changed
  • packages/repl/src/lib/workers/bundler

1 file changed

+4
-4
lines changed

packages/repl/src/lib/workers/bundler/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,14 +300,14 @@ async function get_bundle(
300300

301301
const fetch_package_info = async (pkg_url: string) => {
302302
try {
303-
pkg_url = await follow_redirects(pkg_url, uid);
303+
const redirected = await follow_redirects(pkg_url, uid);
304304

305-
if (!pkg_url) throw new Error();
305+
if (!redirected) throw new Error();
306306

307-
const pkg_json = (await fetch_if_uncached(pkg_url, uid))?.body;
307+
const pkg_json = (await fetch_if_uncached(redirected, uid))?.body;
308308
const pkg = JSON.parse(pkg_json ?? '""');
309309

310-
const pkg_url_base = pkg_url.replace(/\/package\.json$/, '');
310+
const pkg_url_base = redirected.replace(/\/package\.json$/, '');
311311

312312
return {
313313
pkg,

0 commit comments

Comments
 (0)