fix: [CODE-1514]: fix for runtime error if switching between branches (#1080)

This commit is contained in:
Karan Saraswat 2024-02-29 07:27:09 +00:00 committed by Harness
parent 43841ea523
commit 2d991b4d61

View File

@ -46,8 +46,8 @@ export function ContentHeader({
const history = useHistory()
const _isDir = isDir(resourceContent)
const space = useGetSpaceParam()
const repoPath = compact([repoMetadata.uid, resourceContent.path])
useDocumentTitle(isEmpty(resourceContent.path) ? getString('pageTitle.repository') : repoPath.join('/'))
const repoPath = compact([repoMetadata.uid, resourceContent?.path])
useDocumentTitle(isEmpty(resourceContent?.path) ? getString('pageTitle.repository') : repoPath.join('/'))
const permPushResult = hooks?.usePermissionTranslate?.(
{