mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
fix: type of parseSHA
This commit is contained in:
parent
e5f0d1b1cb
commit
0892b7dd5e
1 changed files with 4 additions and 4 deletions
|
|
@ -21,7 +21,7 @@ function parse(): MetaData & { path: string[] } {
|
|||
|
||||
function parseSHA() {
|
||||
const { type, path } = parse()
|
||||
return type === 'blob' || type === 'tree' ? path[0] : false
|
||||
return type === 'blob' || type === 'tree' ? path[0] : undefined
|
||||
}
|
||||
|
||||
function isInRepoPage() {
|
||||
|
|
@ -43,9 +43,9 @@ function isInCodePage(metaData: MetaData = {}) {
|
|||
const { type, branchName } = mergedRepo
|
||||
return Boolean(
|
||||
isInRepoPage() &&
|
||||
(!type || type === TYPES.TREE || type === TYPES.BLOB) &&
|
||||
type !== TYPES.COMMIT &&
|
||||
(branchName || (!type && !branchName))
|
||||
(!type || type === TYPES.TREE || type === TYPES.BLOB) &&
|
||||
type !== TYPES.COMMIT &&
|
||||
(branchName || (!type && !branchName))
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue