fix: Share links containing share links can lead to 'Not found' pages

This commit is contained in:
Tom Moor
2022-09-22 09:11:45 -04:00
parent 62b4f520de
commit 4f40c64101

View File

@@ -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);
}