1.While creating the Math.tex() instance,don't pass the textstyle parameter.
Solution:
1)In the Math.tex() method when we are returning the Math object ,check if textstyle is null or not and if it's then assign a default textstyle to it.
2)In the build method where we are are initializing the options ,in the MathOptions object check if textstyle is null before getting it's color value and if it's then assign some default color to it.
Steps to recreate the issue
1.While creating the Math.tex() instance,don't pass the textstyle parameter.
Solution:
1)In the Math.tex() method when we are returning the Math object ,check if textstyle is null or not and if it's then assign a default textstyle to it. 2)In the build method where we are are initializing the options ,in the MathOptions object check if textstyle is null before getting it's color value and if it's then assign some default color to it.