UI formatURL: render null token correctly

If the token argument to formatURL is null, it should be rendered as the
empty string and not the string 'null'.

Should fix #1316 in which Safari gets a 403 error when visiting the
key/value page in the web UI.
This commit is contained in:
David Adams 2015-10-19 22:06:51 -05:00
parent e55a172c3d
commit 0c130994f7
1 changed files with 3 additions and 0 deletions

View File

@ -379,6 +379,9 @@ App.SettingsRoute = App.BaseRoute.extend({
// Adds any global parameters we need to set to a url/path
function formatUrl(url, dc, token) {
if (token == null) {
token = "";
}
if (url.indexOf("?") > 0) {
// If our url has existing params
url = url + "&dc=" + dc;