From 96202b041e9426e3f319cb9eed48495eb6d99e16 Mon Sep 17 00:00:00 2001 From: 3eef8a28f26fb2bcc514e6f1938929a1f931762 <116031952+3eef8a28f26fb2bcc514e6f1938929a1f931762@users.noreply.github.com> Date: Thu, 16 Feb 2023 20:45:30 -0500 Subject: [PATCH] Account for if courses param is empty --- coursedisplay.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/coursedisplay.html b/coursedisplay.html index 5a7331e04..971ed33db 100644 --- a/coursedisplay.html +++ b/coursedisplay.html @@ -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("."); +}