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

Commit 3ba3dbe

Browse files
refactor($http): simplify buildUrl function
1 parent cbdaabf commit 3ba3dbe

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/ng/http.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,11 +1058,7 @@ function $HttpProvider() {
10581058

10591059
forEach(value, function(v) {
10601060
if (isObject(v)) {
1061-
if (isDate(v)){
1062-
v = v.toISOString();
1063-
} else if (isObject(v)) {
1064-
v = toJson(v);
1065-
}
1061+
v = isDate(v) ? v.toISOString() : toJson(v);
10661062
}
10671063
parts.push(encodeUriQuery(key) + '=' +
10681064
encodeUriQuery(v));

0 commit comments

Comments
 (0)