null checks

This commit is contained in:
Kyle Spearrin 2017-12-06 11:31:41 -05:00
parent 056bce3dd9
commit f6833699a6

View file

@ -60,8 +60,8 @@ namespace Bit.Android.Autofill
{
_passwordFields = Fields
.Where(f =>
!f.IdEntry.ToLowerInvariant().Contains("search") &&
(!f.Node.Hint?.ToLowerInvariant().Contains("search") ?? true) &&
(!f.IdEntry?.ToLowerInvariant().Contains("search") ?? true) &&
(!f.Node?.Hint?.ToLowerInvariant().Contains("search") ?? true) &&
(
f.InputType.HasFlag(InputTypes.TextVariationPassword) ||
f.InputType.HasFlag(InputTypes.TextVariationVisiblePassword) ||
@ -70,7 +70,8 @@ namespace Bit.Android.Autofill
).ToList();
if(!_passwordFields.Any())
{
_passwordFields = Fields.Where(f => f.IdEntry?.ToLower().Contains("password") ?? false).ToList();
_passwordFields = Fields.Where(f =>
f.IdEntry?.ToLowerInvariant().Contains("password") ?? false).ToList();
}
}