mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-06 23:59:01 +02:00
Merge pull request #11995 from overleaf/em-unnecessary-returns
Decaf cleanup: unnecessary returns GitOrigin-RevId: e3c006b0e15095c8cbed2911269f704a7fdd1d57
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
// Fix any style issues and re-enable lint.
|
||||
/*
|
||||
* decaffeinate suggestions:
|
||||
* DS102: Remove unnecessary code created because of implicit returns
|
||||
* DS207: Consider shorter variations of null checks
|
||||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
@@ -33,7 +32,7 @@ const ProjectUpdateHandler = {
|
||||
lastUpdated: lastUpdatedAt || new Date().getTime(),
|
||||
lastUpdatedBy,
|
||||
}
|
||||
return Project.updateOne(conditions, update, {}, callback)
|
||||
Project.updateOne(conditions, update, {}, callback)
|
||||
},
|
||||
|
||||
// like markAsUpdated but allows lastUpdatedAt to be reset to earlier time
|
||||
@@ -53,13 +52,13 @@ const ProjectUpdateHandler = {
|
||||
lastUpdated: lastUpdatedAt || new Date().getTime(),
|
||||
lastUpdatedBy,
|
||||
}
|
||||
return Project.updateOne(conditions, update, {}, callback)
|
||||
Project.updateOne(conditions, update, {}, callback)
|
||||
},
|
||||
|
||||
markAsOpened(project_id, callback) {
|
||||
const conditions = { _id: project_id }
|
||||
const update = { lastOpened: Date.now() }
|
||||
return Project.updateOne(conditions, update, {}, function (err) {
|
||||
Project.updateOne(conditions, update, {}, function (err) {
|
||||
if (callback != null) {
|
||||
return callback()
|
||||
}
|
||||
@@ -69,7 +68,7 @@ const ProjectUpdateHandler = {
|
||||
markAsInactive(project_id, callback) {
|
||||
const conditions = { _id: project_id }
|
||||
const update = { active: false }
|
||||
return Project.updateOne(conditions, update, {}, function (err) {
|
||||
Project.updateOne(conditions, update, {}, function (err) {
|
||||
if (callback != null) {
|
||||
return callback()
|
||||
}
|
||||
@@ -79,7 +78,7 @@ const ProjectUpdateHandler = {
|
||||
markAsActive(project_id, callback) {
|
||||
const conditions = { _id: project_id }
|
||||
const update = { active: true }
|
||||
return Project.updateOne(conditions, update, {}, function (err) {
|
||||
Project.updateOne(conditions, update, {}, function (err) {
|
||||
if (callback != null) {
|
||||
return callback()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user