Bugfix: Only try to load file if there's a path
This commit is contained in:
parent
4dd0c0ccb5
commit
d237318ef4
@ -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(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user