HistoryApiManager.js 733 B

1234567891011121314151617181920212223
  1. /* eslint-disable
  2. camelcase,
  3. no-unused-vars,
  4. */
  5. // TODO: This file was created by bulk-decaffeinate.
  6. // Fix any style issues and re-enable lint.
  7. /*
  8. * decaffeinate suggestions:
  9. * DS102: Remove unnecessary code created because of implicit returns
  10. * DS207: Consider shorter variations of null checks
  11. * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
  12. */
  13. import * as WebApiManager from './WebApiManager.js'
  14. import logger from '@overleaf/logger'
  15. export function shouldUseProjectHistory(project_id, callback) {
  16. if (callback == null) {
  17. callback = function () {}
  18. }
  19. return WebApiManager.getHistoryId(project_id, (error, historyId) =>
  20. callback(error, historyId != null)
  21. )
  22. }