domain search term must be at least 3 characters

This commit is contained in:
Kyle Spearrin 2018-03-16 10:41:53 -04:00
parent e519b13533
commit b26067e5da

View file

@ -483,8 +483,10 @@ namespace Bit.App.Services
(loginNameString != null && loginNameString.Contains(term));
if(!addedFromSearchTerm)
{
addedFromSearchTerm = (loginDomainName != null && term.Contains(loginDomainName.Split('.')[0]))
|| (loginNameString != null && term.Contains(loginNameString));
var domainTerm = loginDomainName?.Split('.')[0];
addedFromSearchTerm =
(domainTerm != null && domainTerm.Length > 2 && term.Contains(domainTerm)) ||
(loginNameString != null && term.Contains(loginNameString));
}
if(addedFromSearchTerm)