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

Commit 0209b2e

Browse files
committed
style($http): fix indentation
1 parent 2ad1b4c commit 0209b2e

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
@@ -977,30 +977,28 @@ function $HttpProvider() {
977977

978978

979979
function buildUrl(url, params) {
980-
if (!params) return url;
981-
var parts = [];
982-
forEachSorted(params, function(value, key) {
983-
if (value === null || isUndefined(value)) return;
984-
if (!isArray(value)) value = [value];
985-
986-
forEach(value, function(v) {
987-
if (isObject(v)) {
988-
if (isDate(v)){
989-
v = v.toISOString();
990-
} else if (isObject(v)) {
991-
v = toJson(v);
992-
}
993-
}
994-
parts.push(encodeUriQuery(key) + '=' +
995-
encodeUriQuery(v));
996-
});
997-
});
998-
if(parts.length > 0) {
999-
url += ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');
980+
if (!params) return url;
981+
var parts = [];
982+
forEachSorted(params, function(value, key) {
983+
if (value === null || isUndefined(value)) return;
984+
if (!isArray(value)) value = [value];
985+
986+
forEach(value, function(v) {
987+
if (isObject(v)) {
988+
if (isDate(v)){
989+
v = v.toISOString();
990+
} else if (isObject(v)) {
991+
v = toJson(v);
992+
}
1000993
}
1001-
return url;
1002-
}
1003-
1004-
994+
parts.push(encodeUriQuery(key) + '=' +
995+
encodeUriQuery(v));
996+
});
997+
});
998+
if(parts.length > 0) {
999+
url += ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');
1000+
}
1001+
return url;
1002+
}
10051003
}];
10061004
}

0 commit comments

Comments
 (0)