fix(core): address new entries error for non-github backends (#2390)

This commit is contained in:
Bartholomew 2019-06-18 22:55:53 +01:00 committed by Shawn Erquhart
parent aecd08ba2f
commit a5bd6b3e89

View File

@ -413,7 +413,10 @@ export default class GitGateway {
return this.backend.unpublishedEntries();
}
unpublishedEntry(collection, slug) {
return this.backend.unpublishedEntry(collection, slug);
return (
(this.backend.unpublishedEntry && this.backend.unpublishedEntry(collection, slug)) ||
Promise.resolve(false)
);
}
updateUnpublishedEntryStatus(collection, slug, newStatus) {
return this.backend.updateUnpublishedEntryStatus(collection, slug, newStatus);