X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/77de5063128440bd88623f634c522b8933770f2e..5c0aeb1558a778cd5790be5e062c2df7d9b51da6:/vendor/assets/ohauth/ohauth.js diff --git a/vendor/assets/ohauth/ohauth.js b/vendor/assets/ohauth/ohauth.js index 210e859e4..73eb8b9ee 100644 --- a/vendor/assets/ohauth/ohauth.js +++ b/vendor/assets/ohauth/ohauth.js @@ -16,7 +16,9 @@ ohauth.qsString = function(obj) { }; ohauth.stringQs = function(str) { - return str.split('&').reduce(function(obj, pair){ + return str.split('&').filter(function (pair) { + return pair !== ''; + }).reduce(function(obj, pair){ var parts = pair.split('='); obj[decodeURIComponent(parts[0])] = (null === parts[1]) ? '' : decodeURIComponent(parts[1]);