Skip to content

Commit

Permalink
fix: Share links containing share links can lead to 'Not found' pages
Browse files Browse the repository at this point in the history
  • Loading branch information
tommoor committed Sep 22, 2022
1 parent 62b4f52 commit 4f40c64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/components/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ function Editor(props: Props, ref: React.RefObject<SharedEditor> | 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);
}

Expand Down

0 comments on commit 4f40c64

Please sign in to comment.