diff --git a/app/components/Editor.tsx b/app/components/Editor.tsx index 06dbd0606a37..0397fc7c7e80 100644 --- a/app/components/Editor.tsx +++ b/app/components/Editor.tsx @@ -160,7 +160,9 @@ function Editor(props: Props, ref: React.RefObject | null) { } } - if (shareId) { + // If we're navigating to an internal document link then prepend the + // share route to the URL so that the document is loaded in context + if (shareId && navigateTo.includes("/doc/")) { navigateTo = sharedDocumentPath(shareId, navigateTo); }