Fix leading white-space resulting in no results

This should in theory make !search ignore leading white spaces that cause no results to be found since it is taken into the equation.
I might have missed a spot but i am pretty sure this is the only place where we work with the search query
This commit is contained in:
Nils 2019-05-13 22:59:44 +02:00 committed by GitHub
parent c4ae36c745
commit cc1c6afc72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -287,7 +287,7 @@ export class UtilityPlugin extends ZeppelinPlugin<IUtilityPluginConfig> {
}
if (args.query) {
const query = args["case-sensitive"] ? args.query : args.query.toLowerCase();
const query = args["case-sensitive"] ? args.query.trimStart() : args.query.toLowerCase().trimStart();
matchingMembers = matchingMembers.filter(member => {
const nick = args["case-sensitive"] ? member.nick : member.nick && member.nick.toLowerCase();