fix (linting): codacy fixes

This commit is contained in:
scmmishra 2019-04-22 11:46:22 +05:30
parent 5b9df676a4
commit 823d89cf66
2 changed files with 9 additions and 10 deletions

View File

@ -35,7 +35,7 @@ frappe.ready(() => {
if(this.checkLogin()) {
lms.call("get_all_course_enrollments").then(data => {
this.enrolledCourses = data;
})
});
}
},
checkLogin() {
@ -50,18 +50,18 @@ frappe.ready(() => {
if(this.checkLogin()){
if(this.enrolledPrograms) {
if(this.enrolledPrograms.includes(programName)) {
return true
return true;
}
else {
return false
return false;
}
}
else {
return false
return false;
}
}
else {
return false
return false;
}
}
}
@ -72,11 +72,10 @@ frappe.ready(() => {
template: "<lms-root/>",
components: { lmsRoot },
mounted() {
lms.store.updateState()
lms.store.updateState();
}
});
lms.view.$router.afterEach((to, from) => {
window.scrollTo(0,0)
window.scrollTo(0,0);
});
lms.debug = true
});

View File

@ -29,14 +29,14 @@ const routes = [{
props: true,
beforeRouteUpdate (to, from, next) {
if (lms.store.checkProgramEnrollment(to.params.program_name)) {
next()
next();
} else {
next({
name: 'program',
params: {
program_name: to.params.program_name
}
})
});
}
}
},