From cdc7a868b69a1f989368935ecc973835053ad9dd Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 29 Sep 2020 17:54:33 +0200 Subject: [PATCH] Fix spreadsheet history when no checkpoint --- customize.dist/src/less2/include/toolbar-history.less | 3 +++ www/common/onlyoffice/history.js | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/customize.dist/src/less2/include/toolbar-history.less b/customize.dist/src/less2/include/toolbar-history.less index b4233dbb9..2753daf8a 100644 --- a/customize.dist/src/less2/include/toolbar-history.less +++ b/customize.dist/src/less2/include/toolbar-history.less @@ -73,6 +73,9 @@ .cp-history-timeline-actions { margin-left: 21px !important; } + .cp-toolbar-history-actions { + align-items: baseline !important; + } } &.cp-smallpatch { .cp-history-snapshot { diff --git a/www/common/onlyoffice/history.js b/www/common/onlyoffice/history.js index 75a670245..026477d1d 100644 --- a/www/common/onlyoffice/history.js +++ b/www/common/onlyoffice/history.js @@ -30,7 +30,8 @@ define([ return hashes[a].index - hashes[b].index; }); - var endWithCp = config.onlyoffice.lastHash === hashes[sortedCp[sortedCp.length - 1]].hash; + var endWithCp = sortedCp.length && + config.onlyoffice.lastHash === hashes[sortedCp[sortedCp.length - 1]].hash; var fillOO = function (id, messages) { if (!id) { return; }