diff --git a/CSharpMath.Editor/SubIndexTypeMismatchException.cs b/CSharpMath.Editor/SubIndexTypeMismatchException.cs index 3333cd00..df3c7bb3 100644 --- a/CSharpMath.Editor/SubIndexTypeMismatchException.cs +++ b/CSharpMath.Editor/SubIndexTypeMismatchException.cs @@ -7,8 +7,6 @@ public class SubIndexTypeMismatchException : InvalidOperationException { public SubIndexTypeMismatchException(Type atomType, MathListIndex index) : base( $"{atomType} not found at index {index.AtomIndex}.") { } public SubIndexTypeMismatchException(MathListIndex index) : base( - Array.IndexOf(typeof(MathListSubIndexType).GetEnumValues(), index.SubIndexType) == -1 - ? $"{index.SubIndexType} is an invalid subindex type." - : $"{index.SubIndexType} not found at index {index.AtomIndex}.") { } + $"{index.SubIndexType} not found at index {index.AtomIndex}.") { } } }