0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

subscribers: fix adding subscriber from admin if collection is empty

This commit is contained in:
kirrg001 2016-05-11 18:48:59 +02:00
parent e6fe1c672c
commit 88fed6f95a

View file

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