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:
parent
e6fe1c672c
commit
88fed6f95a
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue