Modified type to prevent a null reference

This commit is contained in:
Kathy Ruffing 2020-02-17 13:23:02 +00:00
parent 00efe2a582
commit bde69ec7b2

View File

@ -2408,7 +2408,7 @@ namespace VEPROMS.CSLA.Library
if (par2 != null && par2.IsSection)
{
// check for 6.1 (parent) and 6.1.1.
if (DisplayNumber.StartsWith((ActiveParent as SectionInfo).DisplayNumber.Trim())) return true;
if (DisplayNumber.StartsWith((ActiveParent as ItemInfo).DisplayNumber.Trim())) return true;
}
if (!parNumber.Trim().EndsWith(".0")) return false;
return (myNumber.Trim().StartsWith(parNumber.Trim().Substring(0, parNumber.Length - 1)));