Skip to content

Commit

Permalink
fix: fix empty search string returning no projects (#3151)
Browse files Browse the repository at this point in the history
  • Loading branch information
bistaastha committed Jul 17, 2024
1 parent c076dba commit 696834e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/core/services/projects.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class ProjectsService {
}

addNameSearchFilter(searchNameText: string, params: PlatformProjectParams): void {
if (typeof searchNameText !== 'undefined' && searchNameText !== null) {
if (typeof searchNameText !== 'undefined' && searchNameText) {
params.or = params.or ? `${params.or.slice(0, -1)},` : '(';
params.or += `name.ilike."%${searchNameText}%",sub_project.ilike."%${searchNameText}%")`;
}
Expand Down

0 comments on commit 696834e

Please sign in to comment.