> ts-node test.ts
webpack://MathMLToLaTeX/./src/data/usecases/mathml-to-latex-convertion/mathml-element-to-latex-converter-adapter.ts:13
const { name } = this._mathMLElement;
^
TypeError: Cannot destructure property 'name' of 'this._mathMLElement' as it is undefined.
at t.MathMLElementToLatexConverterAdapter.toLatexConverter (webpack://MathMLToLaTeX/./src/data/usecases/mathml-to-latex-convertion/mathml-element-to-latex-converter-adapter.ts:13:13)
at mathMLElementToLaTeXConverter (webpack://MathMLToLaTeX/./src/data/helpers/mathml-element-to-latex-converter.ts:6:59)
at t.MMultiscripts._prescriptLatex (webpack://MathMLToLaTeX/./src/data/usecases/mathml-to-latex-convertion/converters/mmultiscripts.ts:38:22)
at t.MMultiscripts.convert (webpack://MathMLToLaTeX/./src/data/usecases/mathml-to-latex-convertion/converters/mmultiscripts.ts:21:17)
at map (webpack://MathMLToLaTeX/./src/data/usecases/mathml-to-latex-convertion/converters/math.ts:16:37)
at Array.map (<anonymous>)
at t.Math.convert (webpack://MathMLToLaTeX/./src/data/usecases/mathml-to-latex-convertion/converters/math.ts:16:8)
at map (webpack://MathMLToLaTeX/./src/main/mathml-to-latex.ts:11:53)
at Array.map (<anonymous>)
at Function.convert (webpack://MathMLToLaTeX/./src/main/mathml-to-latex.ts:11:8)
With vanilla javascript, the conversion results in an empty string. Both behaviors are unexpected and I suspect this has to do with the use of mmultiscripts?
When using the following code with ts-node:
There is a resulting error:
With vanilla javascript, the conversion results in an empty string. Both behaviors are unexpected and I suspect this has to do with the use of mmultiscripts?