From 5e9da3f6529c0113ba12baf2ad20f3f90316a4f4 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 25 May 2020 11:45:39 +0200 Subject: [PATCH] Fix spreadsheet issues --- www/common/onlyoffice/inner.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 917ad6082..7359576fa 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -228,7 +228,9 @@ define([ var hashes = old ? oldHashes : content.hashes; if (!hashes || !Object.keys(hashes).length) { return {}; } i = i || 0; - var idx = Object.keys(hashes).map(Number).sort(); + var idx = Object.keys(hashes).map(Number).sort(function (a, b) { + return a-b; + }); var lastIndex = idx[idx.length - 1 - i]; var last = JSON.parse(JSON.stringify(hashes[lastIndex])); return last;