From 519efa7da22bbcba2f7957417a683e58a37e2c97 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 22 Jul 2020 13:41:31 +0200 Subject: [PATCH] Fix XLSX export on Firefox --- www/common/common-util.js | 4 ---- www/common/onlyoffice/inner.js | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/www/common/common-util.js b/www/common/common-util.js index 95959d733..7d76f6c53 100644 --- a/www/common/common-util.js +++ b/www/common/common-util.js @@ -351,10 +351,6 @@ }; }; - Util.slice = function (A) { - return Array.prototype.slice.call(A); - }; - Util.blobToImage = function (blob, cb) { var reader = new FileReader(); reader.onloadend = function() { diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 38ea1fed3..c78f6cbd4 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -1403,7 +1403,7 @@ define([ ext = ['.docx', /*'.odt',*/ '.bin']; } - if (typeof(Atomics) === "undefined") { + if (typeof(Atomics) === "undefined" || typeof (SharedArrayBuffer) === "undefined") { ext = ['.bin']; warning = '
'+Messages.oo_exportChrome+'
'; } @@ -1583,7 +1583,7 @@ define([ if (ext === "bin") { return void importFile(content); } - if (typeof(Atomics) === "undefined") { + if (typeof(Atomics) === "undefined" || typeof (SharedArrayBuffer) === "undefined") { return void UI.alert(Messages.oo_invalidFormat); } var div = h('div.cp-oo-x2tXls', [ @@ -1758,7 +1758,7 @@ define([ } else if (type === "oodoc") { accept = ['.bin', '.odt', '.docx']; } - if (typeof(Atomics) === "undefined") { + if (typeof(Atomics) === "undefined" || typeof (SharedArrayBuffer) === "undefined") { accept = ['.bin']; }