fix(backend-bitbucket): 404 for new entry (#2976)

This commit is contained in:
Bartholomew 2019-12-18 08:48:26 +01:00 committed by Erez Rokah
parent af61245360
commit 20851fe7ea

View File

@ -56,12 +56,10 @@ export default class API {
}; };
branchCommitSha = async () => { branchCommitSha = async () => {
if (this.branchSha) return this.branchSha; const {
target: { hash: branchSha },
({ } = await this.requestJSON(`${this.repoURL}/refs/branches/${this.branch}`);
target: { hash: this.branchSha }, return branchSha;
} = await this.requestJSON(`${this.repoURL}/refs/branches/${this.branch}`));
return this.branchSha;
}; };
isFile = ({ type }) => type === 'commit_file'; isFile = ({ type }) => type === 'commit_file';