Skip to content

Commit

Permalink
Remove always-true condition (#3009)
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 authored Jan 7, 2021
1 parent 8c66feb commit 53eafe1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul
}

String strKey = MatchKey(key, culture);
if (strKey != null && (strKey.Length != 0 || strKey == String.Empty))
if (strKey != null)
{
return strKey;
}
Expand All @@ -142,7 +142,7 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul

private object GetKey(string keyToken, CultureInfo culture)
{
if (keyToken == String.Empty)
if (keyToken.Length == 0)
{
return Key.None;
}
Expand Down

0 comments on commit 53eafe1

Please sign in to comment.