Skip to content

Commit 8312b69

Browse files
sethiddenMarcin Kwiatkowski
authored andcommitted
fix: moving back in history after logout shouldn't 404 (#1118)
M2-595
1 parent 21cb834 commit 8312b69

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/theme/middleware/is-authenticated.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { Middleware } from '@nuxt/types';
22

33
const middleware : Middleware = (context) => {
44
if (!context.app.$vsf.$magento.config.state.getCustomerToken()) {
5-
context.redirect('/');
5+
const homepage = context.localeRoute({ name: 'home' });
6+
context.redirect(homepage);
67
}
78
};
89
export default middleware;

0 commit comments

Comments
 (0)