From b28c9e0fe893d44590aaf80122e41763c0263dce Mon Sep 17 00:00:00 2001 From: EnixCoda Date: Sun, 17 Jul 2022 00:01:21 +0800 Subject: [PATCH] fix: open PR in firefox --- src/platforms/GitHub/utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/platforms/GitHub/utils.ts b/src/platforms/GitHub/utils.ts index 7c1a153..985cfa7 100644 --- a/src/platforms/GitHub/utils.ts +++ b/src/platforms/GitHub/utils.ts @@ -95,7 +95,8 @@ export async function continuousLoadPages(doc: Document, onReceivePage?: (doc: D if (!fragment) break const src = fragment.getAttribute('src') if (!src) break - doc = await getDOM(src) + // Using `src` directly below would fail in Firefox if the src is an absolute path + doc = await getDOM(new URL(src, window.location.origin).href) documents.push(doc) onReceivePage?.(doc) }