HistoryApiManager.js 716 B

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