Skip to content

Commit e855eda

Browse files
committed
Merge branch 'issue74' into alpha
2 parents 32c079c + d088976 commit e855eda

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mathjax3-ts/output/chtml/Wrappers/mtable.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class CHTMLmtable extends CHTMLWrapper {
7070
//
7171
// Determine the number of columns and rows
7272
//
73-
this.numCols = this.childNodes.map(row => (row as CHTMLmtr).numCells).reduce((a, b) => Math.max(a, b));
73+
this.numCols = this.childNodes.map(row => (row as CHTMLmtr).numCells).reduce((a, b) => Math.max(a, b), 0);
7474
this.numRows = this.childNodes.length;
7575
//
7676
// Stretch the columns (rows are already taken care of in the CHTMLmtr wrapper)
@@ -192,12 +192,12 @@ export class CHTMLmtable extends CHTMLWrapper {
192192
const cLines = this.getColumnAttributes('columnlines').slice(0, cMax).map(x => (x === 'none' ? 0 : .07));
193193
const rLines = this.getColumnAttributes('rowlines').slice(0, cMax).map(x => (x === 'none' ? 0 : .07));
194194
const a = this.font.params.axis_height;
195-
const h = H.concat(D, rLines).reduce((a, b) => a + b) + (frame ? .14 : 0) +
196-
rSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1] || '0');
195+
const h = H.concat(D, rLines).reduce((a, b) => a + b, 0) + (frame ? .14 : 0) +
196+
rSpace.map(x => parseFloat(x)).reduce((a, b) => a + b, 0) + 2 * parseFloat(fSpace[1] || '0');
197197
bbox.h = h / 2 + a;
198198
bbox.d = h / 2 - a;
199-
bbox.w = W.concat(cLines).reduce((a, b) => a + b) +
200-
cSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1] || '0');
199+
bbox.w = W.concat(cLines).reduce((a, b) => a + b, 0) +
200+
cSpace.map(x => parseFloat(x)).reduce((a, b) => a + b, 0) + 2 * parseFloat(fSpace[1] || '0');
201201
}
202202

203203
/******************************************************************/

0 commit comments

Comments
 (0)