0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Merge pull request #6809 from kirrg001/forsubscribe/fix-empty-collection-bug

subscribers: fix adding subscriber from admin if collection is empty
This commit is contained in:
Hannah Wolfe 2016-05-11 22:22:42 +02:00
commit 9d806cf3b1

View file

@ -88,6 +88,12 @@ Subscriber = ghostBookshelf.Model.extend({
if (subscriberWithEmail) {
return subscriberWithEmail;
}
}).catch(function (error) {
if (error.message === 'NotFound' || error.message === 'EmptyResponse') {
return Promise.resolve();
}
return Promise.reject(error);
});
}
});