mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-31 12:19:47 +02:00
Add workbench tabs (#6788)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user