Skip to content

Commit 35919ef

Browse files
committed
Merge branch 'fix-lite-parser' into beta.2
2 parents ff45284 + d18e593 commit 35919ef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mathjax3-ts/adaptors/lite/Parser.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,9 @@ export class LiteParser implements MinDOMParser<LiteDocument> {
356356
* @return {string} The string with " replaced by entities
357357
*/
358358
public protectAttribute(text: string) {
359+
if (typeof text !== 'string') {
360+
text = String(text);
361+
}
359362
return text.replace(/"/, '&quot;');
360363
}
361364

0 commit comments

Comments
 (0)