From b9001f19e6b43b456e31f938b0d45f809ff19fa3 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Tue, 15 Nov 2016 11:41:14 +0000 Subject: [PATCH] use indexOf not matches for searching for project by name matches treats string like regex so chars like ( break it just doing a simple indexOf == -1 is fine for a string match will also fix it for projects with . in name which do come up --- .../web/public/coffee/main/project-list/project-list.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/public/coffee/main/project-list/project-list.coffee b/services/web/public/coffee/main/project-list/project-list.coffee index 39ce68043f..431c24ada7 100644 --- a/services/web/public/coffee/main/project-list/project-list.coffee +++ b/services/web/public/coffee/main/project-list/project-list.coffee @@ -99,7 +99,7 @@ define [ visible = true # Only show if it matches any search text if $scope.searchText.value? and $scope.searchText.value != "" - if !project.name.toLowerCase().match($scope.searchText.value.toLowerCase()) + if project.name.toLowerCase().indexOf($scope.searchText.value.toLowerCase()) == -1 visible = false # Only show if it matches the selected tag if $scope.filter == "tag" and selectedTag? and project.id not in selectedTag.project_ids