mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-20 13:33:42 +00:00
Merge pull request #2311 from overleaf/fix-err-error-checks
Fix two err/error confusion issues GitOrigin-RevId: 3dfdeffa5a8d13d64dca3f70533a87c70a06d49b
This commit is contained in:
parent
df45df5b71
commit
56566106c2
2 changed files with 6 additions and 10 deletions
|
@ -113,13 +113,11 @@ module.exports = ChatController = {
|
|||
const _ = user_ids[user_id]
|
||||
;(user_id =>
|
||||
jobs.push(cb =>
|
||||
UserInfoManager.getPersonalInfo(user_id, function(err, user) {
|
||||
if (typeof error !== 'undefined' && error !== null) {
|
||||
return cb(error)
|
||||
}
|
||||
UserInfoManager.getPersonalInfo(user_id, function(error, user) {
|
||||
if (error != null) return cb(error)
|
||||
user = UserInfoController.formatPersonalInfo(user)
|
||||
users[user_id] = user
|
||||
return cb()
|
||||
cb()
|
||||
})
|
||||
))(user_id)
|
||||
}
|
||||
|
|
|
@ -184,11 +184,9 @@ module.exports = HistoryController = {
|
|||
project_id,
|
||||
doc_id,
|
||||
name,
|
||||
(err, doc) => {
|
||||
if (typeof error !== 'undefined' && error !== null) {
|
||||
return next(error)
|
||||
}
|
||||
return res.json({
|
||||
(error, doc) => {
|
||||
if (error != null) return next(error)
|
||||
res.json({
|
||||
doc_id: doc._id
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue