Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit 13554f6

Browse files
authored
Merge pull request #1840 from pkarw/develop
Force SSR disable for my-account and checkout pages
2 parents 5792173 + cb51035 commit 13554f6

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

core/pages/Checkout.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ export default {
360360
asyncData ({ store, route, context }) { // this is for SSR purposes to prefetch data
361361
return new Promise((resolve, reject) => {
362362
if (context) context.output.cacheTags.add(`checkout`)
363+
if (context) context.server.response.redirect('/')
363364
resolve()
364365
})
365366
}

core/pages/MyAccount.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export default {
6868
asyncData ({ store, route, context }) { // this is for SSR purposes to prefetch data
6969
return new Promise((resolve, reject) => {
7070
if (context) context.output.cacheTags.add(`my-account`)
71+
if (context) context.server.response.redirect('/')
7172
resolve()
7273
})
7374
}

0 commit comments

Comments
 (0)