Fix small bug with new language tabs

This commit is contained in:
Robert Lord 2015-06-20 01:53:20 -04:00
parent d14fd0f70e
commit fd5cba00f0

View file

@ -106,15 +106,12 @@ under the License.
// returns a new query string with the new language in it // returns a new query string with the new language in it
function generateNewQueryString(language) { function generateNewQueryString(language) {
if (location.search.length >= 1) { var url = parseURL(location.search);
var url = parseURL(location.search); if (url.language) {
if (url.language) { url.language = language;
url.language = language; return stringifyURL(url);
return stringifyURL(url);
} else {
return language
}
} }
return language;
} }
// if a button is clicked, add the state to the history // if a button is clicked, add the state to the history