diff --git a/src/core/Util.js b/src/core/Util.js index 1dfb09ea..230b6b5e 100644 --- a/src/core/Util.js +++ b/src/core/Util.js @@ -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) {