2023-01-13 12:42:29 +00:00
|
|
|
/* eslint-disable
|
|
|
|
no-unused-vars,
|
|
|
|
*/
|
|
|
|
// TODO: This file was created by bulk-decaffeinate.
|
|
|
|
// 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
|
|
|
|
*/
|
|
|
|
import * as WebApiManager from './WebApiManager.js'
|
|
|
|
import logger from '@overleaf/logger'
|
|
|
|
|
2023-03-20 13:41:11 +00:00
|
|
|
export function shouldUseProjectHistory(projectId, callback) {
|
2023-01-13 12:42:29 +00:00
|
|
|
if (callback == null) {
|
|
|
|
callback = function () {}
|
|
|
|
}
|
2023-03-20 13:41:11 +00:00
|
|
|
return WebApiManager.getHistoryId(projectId, (error, historyId) =>
|
2023-01-13 12:42:29 +00:00
|
|
|
callback(error, historyId != null)
|
|
|
|
)
|
|
|
|
}
|