From 94f92662b190bbe524b33fa45d7d48ffbf0539f6 Mon Sep 17 00:00:00 2001 From: panzerstadt Date: Sun, 26 Nov 2023 15:22:10 +0900 Subject: [PATCH] actually don't ensure https, to allow in-site redirect --- components/interpreter/useRedirect.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/components/interpreter/useRedirect.ts b/components/interpreter/useRedirect.ts index 7b0676c..51c1109 100644 --- a/components/interpreter/useRedirect.ts +++ b/components/interpreter/useRedirect.ts @@ -11,10 +11,7 @@ export const useRedirect = (ref: MutableRefObject, newtab?: useEffect(() => { if (!currentRef) return; - let path = removeTimestamp(currentRef); - if (!path.startsWith("http")) { - path = `https://${path}`; - } + const path = removeTimestamp(currentRef); window.open(path, newtab ? "_blank" : "_self"); }, [currentRef, newtab]); };