X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/0d35a10a503f466f5cb7fe41fcb9e0c5167d9ee1..d9d8d5a106e4da75f762a833af51ae920b796064:/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]);