Skip to content

Commit a14d976

Browse files
authored
Merge pull request #1394 from mathjax/fix/mpadded
Make sure width is a string before using match()
2 parents 428272b + a5f845b commit a14d976

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ts/output/common/Wrappers/mpadded.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export function CommonMpaddedMixin<
173173
{
174174
get containerWidth(): number {
175175
const attributes = this.node.attributes;
176-
const w = attributes.get('width') as string;
176+
const w = attributes.get('width').toString();
177177
if (
178178
!w.match(/^[-+]|%$/) &&
179179
attributes.get('data-overflow') === 'linebreak'

0 commit comments

Comments
 (0)