Minor fixes from enterprise codebase

This commit is contained in:
Tom Moor
2023-02-12 16:31:15 -05:00
parent 33afa2f029
commit e028715afb
3 changed files with 14 additions and 0 deletions

View File

@@ -164,6 +164,12 @@ function Editor(props: Props, ref: React.RefObject<SharedEditor> | null) {
}
}
// Link to our own API should be opened in a new tab, not in the app
if (navigateTo.startsWith("/api/")) {
window.open(href, "_blank");
return;
}
// 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/")) {