Skip to content

Commit

Permalink
[Angular] Sonar: Unnecessary use of conditional expression for defaul…
Browse files Browse the repository at this point in the history
…t assignment (#25098)
  • Loading branch information
qmonmert authored Feb 5, 2024
1 parent 848305e commit 2f982a5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class SortService {
return { predicate: split[0], order: split[1] as any };
}
}
return { predicate: sortParam ? sortParam : undefined };
return { predicate: sortParam?.length ? sortParam : undefined };
};

public buildSortParam(sortState: SortState): string[] {
Expand Down

0 comments on commit 2f982a5

Please sign in to comment.