Add workbench tabs (#6788)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina
2024-10-03 01:49:49 +07:00
committed by GitHub
parent ce2621d472
commit b5fed4879f
36 changed files with 794 additions and 69 deletions
+4 -1
View File
@@ -175,7 +175,10 @@ export function getDocumentLinkId (doc: Document): string {
return `${slug}-${doc._id}`
}
export function parseDocumentId (shortLink: string): Ref<Document> | undefined {
export function parseDocumentId (shortLink?: string): Ref<Document> | undefined {
if (shortLink === undefined) {
return undefined
}
const parts = shortLink.split('-')
if (parts.length > 1) {
return parts[parts.length - 1] as Ref<Document>