Account for if courses param is empty

This commit is contained in:
3eef8a28f26fb2bcc514e6f1938929a1f931762 2023-02-16 20:45:30 -05:00
parent aa11def877
commit 96202b041e

View file

@ -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>