Skip to content

Commit

Permalink
actually don't ensure https, to allow in-site redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
panzerstadt committed Nov 26, 2023
1 parent f2c4eac commit 94f9266
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions components/interpreter/useRedirect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ export const useRedirect = (ref: MutableRefObject<Program | undefined>, 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]);
};

0 comments on commit 94f9266

Please sign in to comment.