Skip to content

Commit

Permalink
minor code simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
striezel committed Nov 22, 2024
1 parent 52a2c88 commit dd54789
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions export-server/ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand All @@ -109,6 +109,4 @@ exports.render = async function(jsonData, filename, width, height) {
result = { success: false, failure: 'promise-rejected' };
return result;
});

return result;
};

0 comments on commit dd54789

Please sign in to comment.