Skip to content

Commit

Permalink
AMP-3122/3377: fix syntax of router reference on store (this change was
Browse files Browse the repository at this point in the history
left out in previous commit)
  • Loading branch information
yingfeng-iu committed Sep 20, 2024
1 parent cd94f62 commit 5114043
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,12 +471,12 @@ router.beforeEach(async (to, from, next) => {
var success = await accountService.validate();
if (!success) {
// return next();
router.app.$store.state.isAuthenticated = false;
router.app.$store.commit("isAuthenticated");
store.state.isAuthenticated = false;
store.commit("isAuthenticated");
console.log("router: Auth token invalid!")
return next({ path: "/account/login", query: { returnUrl: to.path } });
} else {
router.app.$store.state.isAuthenticated = true;
store.state.isAuthenticated = true;
let action = authorize.actionType + "-" + authorize.targetType;
// let acActions = router.app.$store.state.acActions;
let acActions = store.state.acActions;
Expand Down

0 comments on commit 5114043

Please sign in to comment.