From 9ef6cd90e590227d7133a50eafaedd78fdeb1097 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 28 Oct 2021 13:45:02 +0200 Subject: [PATCH] Fix infinite spinner when converting odt triggers errors --- www/common/outer/x2t.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/www/common/outer/x2t.js b/www/common/outer/x2t.js index e712a9d96..76dcd2f75 100644 --- a/www/common/outer/x2t.js +++ b/www/common/outer/x2t.js @@ -182,10 +182,18 @@ define([ + getToId(outputFormat) + "false" + ""; + + // writing params file to mounted working disk (in memory) x2t.FS.writeFile('/working/params.xml', params); - // running conversion - x2t.ccall("runX2T", ["number"], ["string"], ["/working/params.xml"]); + try { + // running conversion + x2t.ccall("runX2T", ["number"], ["string"], ["/working/params.xml"]); + } catch (e) { + console.error(e); + return ""; + } + // reading output file from working disk (in memory) var result; try {