Commit 7b7b93d8 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

Landing: Improve redirect behavior

parent d8716c4d
...@@ -143,7 +143,11 @@ ...@@ -143,7 +143,11 @@
application_id: "cribjs" application_id: "cribjs"
}) })
.push(function () { .push(function () {
document.location = data.redirect_url; if (data.redirect_url) {
document.location = data.redirect_url;
} else {
document.location.reload();
}
}) })
.push(console.log, console.log); .push(console.log, console.log);
} }
...@@ -160,7 +164,6 @@ ...@@ -160,7 +164,6 @@
to_path: site, to_path: site,
zip_url: "https://lab.nexedi.com/cedric.leninivin/cribjs-editor/" + zip_url: "https://lab.nexedi.com/cedric.leninivin/cribjs-editor/" +
"-/archive/master/cribjs-editor-master.zip", "-/archive/master/cribjs-editor-master.zip",
redirect_url: site
}; };
if (params.hasOwnProperty("from_path")) { if (params.hasOwnProperty("from_path")) {
data.from_path = params.from_path; data.from_path = params.from_path;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment