fix version author when changes exist ( Fix Bug 73505 )

This commit is contained in:
Sergey Linnik
2025-03-12 12:21:35 +03:00
parent 688cdd8ee9
commit 336e37cf44
3 changed files with 3 additions and 3 deletions

View File

@ -533,7 +533,7 @@ DocManager.prototype.getHistory = function getHistory(fileName, content, keyVers
let createdFromJson = null;
if (fileContent) { // if content is defined
if (fileContent.changes && fileContent.changes.length) { // and there are some modifications in the content
[contentJson] = fileContent.changes; // write these modifications to the json content
contentJson = fileContent.changes[fileContent.changes.length - 1]; // write these modifications to the json content
} else if (fileContent.length) {
[contentJson] = fileContent; // otherwise, write original content to the json content
oldVersion = true; // and note that this is an old version