mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
Fixed MentionSendingService listening to events multiple times in tests
no issue
This commit is contained in:
parent
4147663cde
commit
b2e00221e1
@ -26,7 +26,12 @@ function getPostUrl(post) {
|
||||
|
||||
module.exports = {
|
||||
controller: new MentionController(),
|
||||
didInit: false,
|
||||
async init() {
|
||||
if (this.didInit) {
|
||||
return;
|
||||
}
|
||||
this.didInit = true;
|
||||
const repository = new BookshelfMentionRepository({
|
||||
MentionModel: models.Mention,
|
||||
DomainEvents
|
||||
@ -97,6 +102,6 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
});
|
||||
sendingService.listen(events);
|
||||
sendingService.listen(events);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user