mirror of
https://github.com/quatalog/site.git
synced 2024-09-29 21:58:48 +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 it is, redirect to it
|
||||||
if(course_exists) {
|
if(course_exists) {
|
||||||
const loc = window.location.pathname;
|
|
||||||
// handle both homepage and courses pages
|
// 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;
|
location.href = "courses/"+code_str;
|
||||||
} else {
|
} else {
|
||||||
location.href = code_str;
|
location.href = code_str;
|
||||||
|
|
Loading…
Reference in a new issue