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

Commit ec1cece

Browse files
ItsLeeOwenbtford
ItsLeeOwen
authored andcommitted
fix(orderBy): remove redundant if statement
Removed unnecessary additional conditional statement.
1 parent 4656e38 commit ec1cece

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ng/filter/orderBy.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,10 @@ function orderByFilter($parse){
125125
var t1 = typeof v1;
126126
var t2 = typeof v2;
127127
if (t1 == t2) {
128-
if (t1 == "string") v1 = v1.toLowerCase();
129-
if (t1 == "string") v2 = v2.toLowerCase();
128+
if (t1 == "string") {
129+
v1 = v1.toLowerCase();
130+
v2 = v2.toLowerCase();
131+
}
130132
if (v1 === v2) return 0;
131133
return v1 < v2 ? -1 : 1;
132134
} else {

0 commit comments

Comments
 (0)