X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/77de5063128440bd88623f634c522b8933770f2e..5c58f00c2e80bfe0e5b0665b74e5a973fabb2db4:/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]);