From a10425299eca7b5984ef1aa49d3b8b674997d082 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 29 Sep 2020 17:48:37 +0200 Subject: [PATCH] Fix spreadsheet creation --- www/common/onlyoffice/history.js | 2 +- www/common/onlyoffice/main.js | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/www/common/onlyoffice/history.js b/www/common/onlyoffice/history.js index d12d433e6..75a670245 100644 --- a/www/common/onlyoffice/history.js +++ b/www/common/onlyoffice/history.js @@ -198,7 +198,7 @@ define([ $fastNext = $(fastNext).hide(); $next = $(_next).hide(); - var pos = h('span.cp-history-timeline-pos'); + var pos = h('span.cp-history-timeline-pos.fa.fa-caret-down'); var time = h('div.cp-history-timeline-time'); var version = h('div.cp-history-timeline-version'); $time = $(time); diff --git a/www/common/onlyoffice/main.js b/www/common/onlyoffice/main.js index 292291008..5fcf251ea 100644 --- a/www/common/onlyoffice/main.js +++ b/www/common/onlyoffice/main.js @@ -30,11 +30,13 @@ define([ } var parsed = Hash.parsePadUrl(href); - var opts = parsed.getOptions(); - version = opts.versionHash; - opts.versionHash = ""; - href = parsed.getUrl(opts); - hash = parsed.hashData.getHash(opts); + if (parsed && parsed.hashData) { + var opts = parsed.getOptions(); + version = opts.versionHash; + opts.versionHash = ""; + href = parsed.getUrl(opts); + hash = parsed.hashData.getHash(opts); + } document.getElementById('sbox-iframe').setAttribute('src', ApiConfig.httpSafeOrigin + window.location.pathname + 'inner.html?' +