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
1 changed files with 6 additions and 2 deletions

View File

@ -11,8 +11,12 @@ const params = window
({ ...obj, [key]: decodeURIComponent(value) }), ({ ...obj, [key]: decodeURIComponent(value) }),
{} {}
); );
const course = params["course"];
window.location.replace("courses/"+(params["course"])); if(course != undefined) {
window.location.replace("courses/"+(params["course"]));
} else {
window.location.replace(".");
}
</script> </script>
</head> </head>
</html> </html>