The <MathComponent/> should not crash when any symbols are passed to it.
Current Behavior
When the <MathComponent/> is passed a euro symbol € the application crashes with the error:
TypeError: Cannot read properties of null (reading '4')
at Object.Other [as item] (BaseConfiguration.ts:64:1)
at SubHandler.parse (MapHandler.ts:108:1)
at TexParser.parse (TexParser.ts:137:1)
at TexParser.Parse (TexParser.ts:186:1)
at new TexParser (TexParser.ts:89:1)
at TeX.compile (tex.ts:186:1)
at AbstractMathItem.compile (MathItem.ts:365:1)
at Object.renderMath (MathDocument.ts:167:1)
at RenderList.renderConvert (MathDocument.ts:211:1)
at AbstractMathItem.convert
And then the following error which I believe is due to it trying to render an error message as a child component (though I could be wrong on that)
Objects are not valid as a React child (found: [object Error]). If you meant to render a collection of children, use an array instead.
In the 'Live Typing' example, paste the symbol € (May also happen with other symbols although I am yet to find any such ones)
The site will crash and the above error is shown in the browser console
Context (Environment)
Happens in (at least) both Chrome and Firefox. My use case is trying to display currency-based maths questions with currency symbols (£, $, and ¥ all work fine so I'm not sure what's different about the € symbol)
Expected Behavior
The
<MathComponent/>
should not crash when any symbols are passed to it.Current Behavior
When the
<MathComponent/>
is passed a euro symbol€
the application crashes with the error:And then the following error which I believe is due to it trying to render an error message as a child component (though I could be wrong on that)
Steps to Reproduce
€
(May also happen with other symbols although I am yet to find any such ones)Context (Environment)
Happens in (at least) both Chrome and Firefox. My use case is trying to display currency-based maths questions with currency symbols (
£
,$
, and¥
all work fine so I'm not sure what's different about the€
symbol)