Skip to content

Commit

Permalink
Fix eslint errors introduced in last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
fe-cj committed Sep 11, 2024
1 parent e7ebb90 commit dcfd8c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/DocumentContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ class DocumentContext extends EventEmitter {
const {pageCtx, isSnapshot} = this.pageSnapshot();
pageCtx.availableWidth = this.getCurrentPage().pageSize.width - this.pageMargins.left - this.pageMargins.right;
if (isSnapshot && this.marginXTopParent) {
pageCtx.availableWidth -= this.marginXTopParent[0]
pageCtx.availableWidth -= this.marginXTopParent[1]
pageCtx.availableWidth -= this.marginXTopParent[0];
pageCtx.availableWidth -= this.marginXTopParent[1];
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/LayoutBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ class LayoutBuilder {

ColumnCalculator.buildColumnWidths(columns, availableWidth);
let result = this.processRow({
marginX: [columnNode._margin?.[0] || 0, columnNode._margin?.[2] || 0],
marginX: columnNode._margin ? [columnNode._margin[0], columnNode._margin[2]] : [0, 0],
cells: columns,
widths: columns,
gaps
Expand Down Expand Up @@ -800,7 +800,7 @@ class LayoutBuilder {
}

let result = this.processRow({
marginX: [tableNode._margin?.[0] || 0, tableNode._margin?.[2] || 0],
marginX: tableNode._margin ? [tableNode._margin[0], tableNode._margin[2]] : [0, 0],
dontBreakRows: processor.dontBreakRows,
rowsWithoutPageBreak: processor.rowsWithoutPageBreak,
cells: tableNode.table.body[i],
Expand Down

0 comments on commit dcfd8c4

Please sign in to comment.