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

Commit cffcfc7

Browse files
committed
style($http): fix indentation
1 parent 25eb9b7 commit cffcfc7

File tree

1 file changed

+22
-24
lines changed

1 file changed

+22
-24
lines changed

src/ng/http.js

+22-24
Original file line numberDiff line numberDiff line change
@@ -1036,30 +1036,28 @@ function $HttpProvider() {
10361036

10371037

10381038
function buildUrl(url, params) {
1039-
if (!params) return url;
1040-
var parts = [];
1041-
forEachSorted(params, function(value, key) {
1042-
if (value === null || isUndefined(value)) return;
1043-
if (!isArray(value)) value = [value];
1044-
1045-
forEach(value, function(v) {
1046-
if (isObject(v)) {
1047-
if (isDate(v)){
1048-
v = v.toISOString();
1049-
} else if (isObject(v)) {
1050-
v = toJson(v);
1051-
}
1052-
}
1053-
parts.push(encodeUriQuery(key) + '=' +
1054-
encodeUriQuery(v));
1055-
});
1056-
});
1057-
if(parts.length > 0) {
1058-
url += ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');
1039+
if (!params) return url;
1040+
var parts = [];
1041+
forEachSorted(params, function(value, key) {
1042+
if (value === null || isUndefined(value)) return;
1043+
if (!isArray(value)) value = [value];
1044+
1045+
forEach(value, function(v) {
1046+
if (isObject(v)) {
1047+
if (isDate(v)){
1048+
v = v.toISOString();
1049+
} else if (isObject(v)) {
1050+
v = toJson(v);
1051+
}
10591052
}
1060-
return url;
1061-
}
1062-
1063-
1053+
parts.push(encodeUriQuery(key) + '=' +
1054+
encodeUriQuery(v));
1055+
});
1056+
});
1057+
if(parts.length > 0) {
1058+
url += ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');
1059+
}
1060+
return url;
1061+
}
10641062
}];
10651063
}

0 commit comments

Comments
 (0)