bug fix in the case of encountering a deleted file commit

This commit is contained in:
Arminkhodaei 2019-02-22 19:39:33 +03:30
parent 54d9675e32
commit 2d13566de9
2 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,9 @@ async function getContent(repo, sha, path) {
{ headers: getHeaders() }
);
if (contentResponse.status === 404) {
return { content: "" };
}
if (!contentResponse.ok) {
throw contentResponse;
}

View File

@ -20,6 +20,9 @@ async function getContent(repo, sha, path) {
{ headers: getHeaders() }
);
if (contentResponse.status === 404) {
return { content: "" };
}
if (!contentResponse.ok) {
throw contentResponse;
}