diff --git a/src/Calculator/Controls/MathRichEditBox.cs b/src/Calculator/Controls/MathRichEditBox.cs index 23966eb3..ce642790 100644 --- a/src/Calculator/Controls/MathRichEditBox.cs +++ b/src/Calculator/Controls/MathRichEditBox.cs @@ -137,7 +137,7 @@ namespace CalculatorApp // If the rich edit has content already, then the mathzone will already be created due to mathonly mode being set and the selection will exist inside the // math zone. To handle this, we will force a math zone to be created in teh case of the text being empty and then replacing the text inside of the math // zone with the newly inserted text. - if (GetMathTextProperty() == null) + if (string.IsNullOrEmpty(GetMathTextProperty())) { SetMathTextProperty("x"); TextDocument.Selection.StartPosition = 0;