From dd5478913af376e425c77a4bc61fff763f224052 Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Fri, 22 Nov 2024 05:58:02 +0100 Subject: [PATCH] minor code simplification --- export-server/ssr.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/export-server/ssr.js b/export-server/ssr.js index ec03f82..c46f179 100644 --- a/export-server/ssr.js +++ b/export-server/ssr.js @@ -88,7 +88,7 @@ exports.render = async function(jsonData, filename, width, height) { failure: 'promise-not-resolved' }; - await + return await fs.promises.readFile('./plotly-2.35.2.min.js', 'utf-8') .then(win.eval) .then(() => win.Plotly.toImage({data: array_data, layout: layout, config: config}, @@ -109,6 +109,4 @@ exports.render = async function(jsonData, filename, width, height) { result = { success: false, failure: 'promise-rejected' }; return result; }); - - return result; };