Эх сурвалжийг харах

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
Henry Oswald 10 жил өмнө
parent
commit
b9001f19e6

+ 1 - 1
services/web/public/coffee/main/project-list/project-list.coffee

@@ -99,7 +99,7 @@ define [
 				visible = true
 				visible = true
 				# Only show if it matches any search text
 				# Only show if it matches any search text
 				if $scope.searchText.value? and $scope.searchText.value != ""
 				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
 						visible = false
 				# Only show if it matches the selected tag
 				# Only show if it matches the selected tag
 				if $scope.filter == "tag" and selectedTag? and project.id not in selectedTag.project_ids
 				if $scope.filter == "tag" and selectedTag? and project.id not in selectedTag.project_ids