Skip to content

Commit e7f97c3

Browse files
authored
Fix no-store test case (#41775)
<!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change that you're making: --> x-ref: https://github.com/vercel/next.js/actions/runs/3319321225/jobs/5484439514
1 parent fe5a502 commit e7f97c3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/next/server/app-render.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ function patchFetch(ComponentMod: any) {
221221
if (staticGenerationStore && isStaticGeneration) {
222222
if (init && typeof init === 'object') {
223223
if (init.cache === 'no-store') {
224-
staticGenerationStore.revalidate = 0
224+
staticGenerationStore.fetchRevalidate = 0
225225
// TODO: ensure this error isn't logged to the user
226226
// seems it's slipping through currently
227227
throw new DynamicServerError(

test/e2e/app-dir/app-static.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,17 @@ describe('app-dir static/dynamic handling', () => {
8585
expect(manifest.version).toBe(3)
8686
expect(manifest.routes).toEqual({
8787
'/blog/tim': {
88-
initialRevalidateSeconds: false,
88+
initialRevalidateSeconds: 10,
8989
srcRoute: '/blog/[author]',
9090
dataRoute: '/blog/tim.rsc',
9191
},
9292
'/blog/seb': {
93-
initialRevalidateSeconds: false,
93+
initialRevalidateSeconds: 10,
9494
srcRoute: '/blog/[author]',
9595
dataRoute: '/blog/seb.rsc',
9696
},
9797
'/blog/styfle': {
98-
initialRevalidateSeconds: false,
98+
initialRevalidateSeconds: 10,
9999
srcRoute: '/blog/[author]',
100100
dataRoute: '/blog/styfle.rsc',
101101
},

0 commit comments

Comments
 (0)