mirror of
https://github.com/quatalog/site.git
synced 2024-11-14 10:53:01 +00:00
Typo
This commit is contained in:
commit
959c2893e5
|
@ -26,9 +26,8 @@ const search_helper = function(event) {
|
|||
|
||||
// if it is, redirect to it
|
||||
if(course_exists) {
|
||||
const loc = window.location.pathname;
|
||||
// handle both homepage and courses pages
|
||||
if(loc.substring(0,loc.lastIndexOf('/')) != "/courses") {
|
||||
if(window.location.pathname.split("/").slice(-2,-1)[0] != "courses") {
|
||||
location.href = "courses/"+code_str;
|
||||
} else {
|
||||
location.href = code_str;
|
||||
|
|
Loading…
Reference in a new issue