mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
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
This commit is contained in:
parent
6776aa61f1
commit
b9001f19e6
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue