mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 12:51:35 +02:00
Merge pull request #22533 from overleaf/ar-only-use-history-for-blobs-when-enabled
[web] only use history for blobs when enabled GitOrigin-RevId: 010983e9b29657d4c594e03945dca5700577bf0a
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
let ProjectEditorHandler
|
||||
const _ = require('lodash')
|
||||
const Path = require('path')
|
||||
const Features = require('../../infrastructure/Features')
|
||||
|
||||
function mergeDeletedDocs(a, b) {
|
||||
const docIdsInA = new Set(a.map(doc => doc._id.toString()))
|
||||
@@ -123,12 +124,18 @@ module.exports = ProjectEditorHandler = {
|
||||
},
|
||||
|
||||
buildFileModelView(file) {
|
||||
const additionalFileProperties = {}
|
||||
|
||||
if (Features.hasFeature('project-history-blobs')) {
|
||||
additionalFileProperties.hash = file.hash
|
||||
}
|
||||
|
||||
return {
|
||||
_id: file._id,
|
||||
name: file.name,
|
||||
linkedFileData: file.linkedFileData,
|
||||
created: file.created,
|
||||
hash: file.hash,
|
||||
...additionalFileProperties,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user