Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
fix(orderBy): remove redundant if statement
Browse files Browse the repository at this point in the history
Removed unnecessary additional conditional statement.
  • Loading branch information
ItsLeeOwen authored and btford committed Aug 14, 2013
1 parent 60af2ec commit 5e45fd4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ng/filter/orderBy.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,10 @@ function orderByFilter($parse){
var t1 = typeof v1;
var t2 = typeof v2;
if (t1 == t2) {
if (t1 == "string") v1 = v1.toLowerCase();
if (t1 == "string") v2 = v2.toLowerCase();
if (t1 == "string") {
v1 = v1.toLowerCase();
v2 = v2.toLowerCase();
}
if (v1 === v2) return 0;
return v1 < v2 ? -1 : 1;
} else {
Expand Down

0 comments on commit 5e45fd4

Please sign in to comment.