Fixed this context for methods passed into importer

refs https://github.com/TryGhost/Team/issues/916

- Without `.bind`, `this` context was lost when used inside of the CSVImporter calss
This commit is contained in:
Naz 2021-07-21 11:51:45 +04:00 committed by naz
parent 25dcfde368
commit 170617feb3

View File

@ -132,10 +132,10 @@ const membersService = {
getTimezone: () => settingsCache.get('timezone'),
getMembersApi: () => membersApi,
sendEmail: ghostMailer.send.bind(ghostMailer),
isSet: labsService.isSet,
addJob: jobsService.addJob,
isSet: labsService.isSet.bind(labsService),
addJob: jobsService.addJob.bind(jobsService),
knex: db.knex,
urlFor: urlUtils.urlFor
urlFor: urlUtils.urlFor.bind(urlUtils)
}),
stats: new MembersStats({