mirror of
https://github.com/quatalog/site.git
synced 2025-01-11 22:57:44 +00:00
Account for if courses param is empty
This commit is contained in:
parent
47b0ebbe1a
commit
410269025f
|
@ -11,8 +11,12 @@ const params = window
|
|||
({ ...obj, [key]: decodeURIComponent(value) }),
|
||||
{}
|
||||
);
|
||||
|
||||
window.location.replace("courses/"+(params["course"]));
|
||||
const course = params["course"];
|
||||
if(course != undefined) {
|
||||
window.location.replace("courses/"+(params["course"]));
|
||||
} else {
|
||||
window.location.replace(".");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue