2023-01-13 07:42:29 -05: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 09:41:11 -04:00
|
|
|
export function shouldUseProjectHistory(projectId, callback) {
|
2023-01-13 07:42:29 -05:00
|
|
|
if (callback == null) {
|
|
|
|
callback = function () {}
|
|
|
|
}
|
2023-03-20 09:41:11 -04:00
|
|
|
return WebApiManager.getHistoryId(projectId, (error, historyId) =>
|
2023-01-13 07:42:29 -05:00
|
|
|
callback(error, historyId != null)
|
|
|
|
)
|
|
|
|
}
|