From 9466c145b1b84299be5f865596b3ebdac248b9fa Mon Sep 17 00:00:00 2001
From: moexiami <1927254+Xiami2012@users.noreply.github.com>
Date: Wed, 01 Jan 2025 18:07:59 +0000
Subject: [PATCH] fix(path): correct handle URI schemes in joinSegments (#1693)
---
quartz/components/scripts/util.ts | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/quartz/components/scripts/util.ts b/quartz/components/scripts/util.ts
index c1db8ba..ff486cf 100644
--- a/quartz/components/scripts/util.ts
+++ b/quartz/components/scripts/util.ts
@@ -41,5 +41,5 @@
// 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
}
--
Gitblit v1.10.0