mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-08 23:04:45 +00:00
fix(orderBy): remove redundant if statement
Removed unnecessary additional conditional statement.
This commit is contained in:
parent
60af2ec9a4
commit
5e45fd4ac6
1 changed files with 4 additions and 2 deletions
|
|
@ -125,8 +125,10 @@ function orderByFilter($parse){
|
||||||
var t1 = typeof v1;
|
var t1 = typeof v1;
|
||||||
var t2 = typeof v2;
|
var t2 = typeof v2;
|
||||||
if (t1 == t2) {
|
if (t1 == t2) {
|
||||||
if (t1 == "string") v1 = v1.toLowerCase();
|
if (t1 == "string") {
|
||||||
if (t1 == "string") v2 = v2.toLowerCase();
|
v1 = v1.toLowerCase();
|
||||||
|
v2 = v2.toLowerCase();
|
||||||
|
}
|
||||||
if (v1 === v2) return 0;
|
if (v1 === v2) return 0;
|
||||||
return v1 < v2 ? -1 : 1;
|
return v1 < v2 ? -1 : 1;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue