Skip to content

Commit

Permalink
Bugfix: Only try to load file if there's a path
Browse files Browse the repository at this point in the history
  • Loading branch information
cassiozen committed Jan 19, 2017
1 parent 4dd0c0c commit d237318
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/backends/github/API.js
Expand Up @@ -162,7 +162,10 @@ export default class API {
const unpublishedPromise = this.retrieveMetadata(contentKey)
.then((data) => {
metaData = data;
return this.readFile(data.objects.entry.path, null, data.branch);
if (data.objects.entry.path) {
return this.readFile(data.objects.entry.path, null, data.branch);
}
return Promise.reject(null);
})
.then(fileData => ({ metaData, fileData }))
.catch(() => {
Expand Down

0 comments on commit d237318

Please sign in to comment.