mirror of https://github.com/status-im/consul.git
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:
parent
fc6a605a88
commit
75ded76e44
|
@ -379,6 +379,9 @@ App.SettingsRoute = App.BaseRoute.extend({
|
||||||
|
|
||||||
// Adds any global parameters we need to set to a url/path
|
// Adds any global parameters we need to set to a url/path
|
||||||
function formatUrl(url, dc, token) {
|
function formatUrl(url, dc, token) {
|
||||||
|
if (token == null) {
|
||||||
|
token = "";
|
||||||
|
}
|
||||||
if (url.indexOf("?") > 0) {
|
if (url.indexOf("?") > 0) {
|
||||||
// If our url has existing params
|
// If our url has existing params
|
||||||
url = url + "&dc=" + dc;
|
url = url + "&dc=" + dc;
|
||||||
|
|
Loading…
Reference in New Issue