Skip to content

Commit

Permalink
fix(git/cache): getCachedBranchParentShaResult returns unexpected und…
Browse files Browse the repository at this point in the history
…efined (#16762)
  • Loading branch information
Gabriel-Ladzaretti committed Jul 25, 2022
1 parent 882ce6c commit 24a237c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util/git/parent-sha-cache.ts
Expand Up @@ -7,7 +7,7 @@ export function getCachedBranchParentShaResult(
const { branches } = getCache();
const branch = branches?.find((branch) => branch.branchName === branchName);

if (branchSha === branch?.sha) {
if (branch?.parentSha && branchSha === branch?.sha) {
return branch.parentSha;
}

Expand Down

0 comments on commit 24a237c

Please sign in to comment.