mirror of
https://github.com/outline/outline.git
synced 2026-01-06 11:09:55 -06:00
fix: Relative urls cannot be unfurled
This commit is contained in:
@@ -5,6 +5,7 @@ import styled from "styled-components";
|
||||
import { depths } from "@shared/styles";
|
||||
import { UnfurlType } from "@shared/types";
|
||||
import LoadingIndicator from "~/components/LoadingIndicator";
|
||||
import env from "~/env";
|
||||
import useEventListener from "~/hooks/useEventListener";
|
||||
import useKeyDown from "~/hooks/useKeyDown";
|
||||
import useMobile from "~/hooks/useMobile";
|
||||
@@ -188,7 +189,7 @@ function DataLoader({
|
||||
React.useCallback(
|
||||
() =>
|
||||
client.post("/urls.unfurl", {
|
||||
url,
|
||||
url: url.startsWith("/") ? env.URL + url : url,
|
||||
documentId: ui.activeDocumentId,
|
||||
}),
|
||||
[url, ui.activeDocumentId]
|
||||
|
||||
Reference in New Issue
Block a user