Skip to content
Permalink
Browse files

style($http): fix indentation

  • Loading branch information
IgorMinar committed Jul 18, 2014
1 parent 2ad1b4c commit 0209b2e3b2496e865f188c222735612cd7104283
Showing with 22 additions and 24 deletions.
  1. +22 −24 src/ng/http.js
@@ -977,30 +977,28 @@ function $HttpProvider() {


function buildUrl(url, params) {
if (!params) return url;
var parts = [];
forEachSorted(params, function(value, key) {
if (value === null || isUndefined(value)) return;
if (!isArray(value)) value = [value];

forEach(value, function(v) {
if (isObject(v)) {
if (isDate(v)){
v = v.toISOString();
} else if (isObject(v)) {
v = toJson(v);
}
}
parts.push(encodeUriQuery(key) + '=' +
encodeUriQuery(v));
});
});
if(parts.length > 0) {
url += ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');
if (!params) return url;
var parts = [];
forEachSorted(params, function(value, key) {
if (value === null || isUndefined(value)) return;
if (!isArray(value)) value = [value];

forEach(value, function(v) {
if (isObject(v)) {
if (isDate(v)){
v = v.toISOString();
} else if (isObject(v)) {
v = toJson(v);
}
}
return url;
}


parts.push(encodeUriQuery(key) + '=' +
encodeUriQuery(v));
});
});
if(parts.length > 0) {
url += ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');
}
return url;
}
}];
}

0 comments on commit 0209b2e

Please sign in to comment.
You can’t perform that action at this time.