Skip to content

Commit

Permalink
remove _.times
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Metelkin committed Nov 8, 2023
1 parent 99e3fc0 commit 413efc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/module-system/to-math-expr.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const _ = require('lodash');

/*
Transformation of json formatted <math> element to expression string.
Expand Down
4 changes: 2 additions & 2 deletions src/table-export/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ class TableExport extends AbstractExport {

let wb = XLSX.utils.book_new();
out.forEach((x) => {
let omitRows = x.omitRows!==undefined
let omitRows = x.omitRows !== undefined
? x.omitRows // use omitRows from out
: this.omitRows;
let ws = XLSX.utils.json_to_sheet(
_.times(omitRows, {}).concat(x.content),
Array(omitRows).fill({}).concat(x.content),
{ header: x.headerSeq, skipHeader: x.skipHeader } // XLSX tries to mutate header
);
XLSX.utils.book_append_sheet(wb, ws, x.name);
Expand Down

0 comments on commit 413efc9

Please sign in to comment.