From 28b2f5e4f71e717ee6bcdf738a1e7258d4e1732d Mon Sep 17 00:00:00 2001 From: Guillaume Vincent Date: Tue, 3 Jan 2017 10:41:52 +0100 Subject: [PATCH] set password search case insensitive fix https://github.com/lesspass/lesspass/issues/131 --- src/views/Passwords.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/Passwords.vue b/src/views/Passwords.vue index 80eedcd..9d2035d 100644 --- a/src/views/Passwords.vue +++ b/src/views/Passwords.vue @@ -54,7 +54,9 @@ ...mapGetters(['passwords', 'email']), filteredPasswords(){ return this.passwords.filter(password => { - return password.site.indexOf(this.searchQuery) > -1 || password.login.indexOf(this.searchQuery) > -1 + var loginMatch = password.login.match(new RegExp(this.searchQuery, 'i')); + var siteMatch = password.site.match(new RegExp(this.searchQuery, 'i')); + return loginMatch || siteMatch; }) } },