From 8864d626aedf6c831a5b9eb017aab7a75cc0f0c6 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 2 Sep 2021 12:55:40 +0300 Subject: [PATCH] Fix fileType in setHistoryData event --- apps/common/main/lib/controller/History.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/common/main/lib/controller/History.js b/apps/common/main/lib/controller/History.js index 506b64280..cdac7eb07 100644 --- a/apps/common/main/lib/controller/History.js +++ b/apps/common/main/lib/controller/History.js @@ -202,6 +202,7 @@ define([ urlGetTime = new Date(); var diff = (!opts.data.previous || this.currentChangeId===undefined) ? null : opts.data.changesUrl, // if revision has changes, but serverVersion !== app.buildVersion -> hide revision changes url = (!_.isEmpty(diff) && opts.data.previous) ? opts.data.previous.url : opts.data.url, + fileType = (!_.isEmpty(diff) && opts.data.previous) ? opts.data.previous.fileType : opts.data.fileType, docId = opts.data.key ? opts.data.key : this.currentDocId, docIdPrev = opts.data.previous && opts.data.previous.key ? opts.data.previous.key : this.currentDocIdPrev, token = opts.data.token; @@ -217,7 +218,7 @@ define([ rev.set('docIdPrev', docIdPrev, {silent: true}); } rev.set('token', token, {silent: true}); - opts.data.fileType && rev.set('fileType', opts.data.fileType, {silent: true}); + fileType && rev.set('fileType', fileType, {silent: true}); } } var hist = new Asc.asc_CVersionHistory();