Skip to content

Commit d48649b

Browse files
committed
Don't use styles if there aren't any.
1 parent 7e87b25 commit d48649b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,8 @@ export class CHTMLmtable<N, T, D> extends CHTMLWrapper<N, T, D> {
672672
const {L} = this.getTableData();
673673
const sep = this.length2em(this.node.attributes.get('minlabelspacing'));
674674
let pad = L + sep; // FIXME, handle indentalign values
675-
const [lpad, rpad] = [this.styles.get('padding-left'), this.styles.get('padding-right')];
675+
const [lpad, rpad] = (this.styles == null ? ['', ''] :
676+
[this.styles.get('padding-left'), this.styles.get('padding-right')]);
676677
if (lpad || rpad) {
677678
pad = Math.max(pad, this.length2em(lpad || '0'), this.length2em(rpad || '0'));
678679
}

0 commit comments

Comments
 (0)