From 8d442b16302549d0106c8f9c8c7ff511ee6765fd Mon Sep 17 00:00:00 2001 From: snkashis Date: Wed, 26 Dec 2012 10:33:04 -0500 Subject: [PATCH] cleanup to match convention --- src/core/Util.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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) {