Merge pull request #604 from netlify/fix-entry-deletion

Fix entry deletion on non-master branches
This commit is contained in:
Shawn Erquhart 2017-09-15 16:01:39 -04:00 committed by GitHub
commit 4c63a21bbb

View File

@ -275,8 +275,10 @@ export default class API {
const branch = options.branch || this.branch;
const fileURL = `${ this.repoURL }/contents/${ path }`;
// We need to request the file first to get the SHA
return this.request(fileURL)
.then(({ sha }) => this.request(fileURL, {
return this.request(fileURL, {
params: { ref: branch },
cache: "no-store",
}).then(({ sha }) => this.request(fileURL, {
method: "DELETE",
params: {
sha,