From 823d89cf6670d0cb4aa29d7c1470ce864be46a2e Mon Sep 17 00:00:00 2001 From: scmmishra Date: Mon, 22 Apr 2019 11:46:22 +0530 Subject: [PATCH] fix (linting): codacy fixes --- erpnext/public/js/education/lms/lms.js | 15 +++++++-------- erpnext/public/js/education/lms/routes.js | 4 ++-- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/erpnext/public/js/education/lms/lms.js b/erpnext/public/js/education/lms/lms.js index 9ed5cd772e..4665b144c2 100644 --- a/erpnext/public/js/education/lms/lms.js +++ b/erpnext/public/js/education/lms/lms.js @@ -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: "", 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 }); \ No newline at end of file diff --git a/erpnext/public/js/education/lms/routes.js b/erpnext/public/js/education/lms/routes.js index 3bf0e164f9..483f2220c3 100644 --- a/erpnext/public/js/education/lms/routes.js +++ b/erpnext/public/js/education/lms/routes.js @@ -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 } - }) + }); } } },