From 47ccad966160d27409ab0db469b6078d045b81ac Mon Sep 17 00:00:00 2001 From: scmmishra Date: Wed, 27 Feb 2019 12:24:17 +0530 Subject: [PATCH] fix: Reloading bug on Content page --- erpnext/public/js/education/lms/routes.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/public/js/education/lms/routes.js b/erpnext/public/js/education/lms/routes.js index d5aab29236..29ebd3a91b 100644 --- a/erpnext/public/js/education/lms/routes.js +++ b/erpnext/public/js/education/lms/routes.js @@ -27,9 +27,8 @@ const routes = [{ path: '/Program/:program_name/:course_name/:topic/:type/:content', component: ContentPage, props: true, - beforeEnter: (to, from, next) => { - console.log(from.params.program_name) - if (lms.store.checkProgramEnrollment(from.params.program_name)) { + beforeRouteUpdate (to, from, next) { + if (lms.store.checkProgramEnrollment(to.params.program_name)) { next() } else { next({