cleanup to match convention

This commit is contained in:
snkashis 2012-12-26 10:33:04 -05:00
parent 3208db476c
commit 8d442b1630

View File

@ -77,20 +77,14 @@ L.Util = {
return obj.options;
},
getParamString: function (obj, existing_url) {
getParamString: function (obj, existingUrl) {
var params = [];
for (var i in obj) {
if (obj.hasOwnProperty(i)) {
params.push(i + '=' + obj[i]);
}
}
if (existing_url.indexOf('?')===-1) {
return '?' + params.join('&');
}
else {
return '&' + params.join('&');
}
return (existingUrl.indexOf('?') === -1 ? '?' : '&') + params.join('&');
},
template: function (str, data) {