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:
commit
9d806cf3b1
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue