diff --git a/src/backends/github/API.js b/src/backends/github/API.js index d398a706..1f0e87d4 100644 --- a/src/backends/github/API.js +++ b/src/backends/github/API.js @@ -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(() => {