mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 19:58:09 +00:00
UBERF-7073 Properly resolve folder id from fragment (#5677)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
parent
99c5387f19
commit
434f9bf48c
@ -27,8 +27,8 @@ export function getPanelFragment<T extends Doc> (object: Pick<T, '_class' | '_id
|
||||
}
|
||||
|
||||
export function getFolderIdFromFragment (fragment: string): Ref<Folder> | undefined {
|
||||
const [, _id] = decodeURIComponent(fragment).split('|')
|
||||
return _id as Ref<Folder>
|
||||
const [, _id, _class] = decodeURIComponent(fragment).split('|')
|
||||
return _class === drive.class.Folder ? (_id as Ref<Folder>) : drive.ids.Root
|
||||
}
|
||||
|
||||
export function getDriveLink (_id: Ref<Drive>): Location {
|
||||
|
Loading…
Reference in New Issue
Block a user