File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
packages/open-next/src/core/routing Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -146,22 +146,20 @@ export async function cacheInterceptor(
146
146
}
147
147
// We also need to remove trailing slash
148
148
localizedPath = localizedPath . replace ( / \/ $ / , "" ) ;
149
- // If empty path, it means we want index
150
- if ( localizedPath === "" ) {
151
- localizedPath = "index" ;
152
- }
153
149
154
150
debug ( "Checking cache for" , localizedPath , PrerenderManifest ) ;
155
151
156
152
const isISR =
157
- Object . keys ( PrerenderManifest . routes ) . includes ( localizedPath ) ||
153
+ Object . keys ( PrerenderManifest . routes ) . includes ( localizedPath ?? "/" ) ||
158
154
Object . values ( PrerenderManifest . dynamicRoutes ) . some ( ( dr ) =>
159
155
new RegExp ( dr . routeRegex ) . test ( localizedPath ) ,
160
156
) ;
161
157
debug ( "isISR" , isISR ) ;
162
158
if ( isISR ) {
163
159
try {
164
- const cachedData = await globalThis . incrementalCache . get ( localizedPath ) ;
160
+ const cachedData = await globalThis . incrementalCache . get (
161
+ localizedPath ?? "/index" ,
162
+ ) ;
165
163
debug ( "cached data in interceptor" , cachedData ) ;
166
164
167
165
if ( ! cachedData ?. value ) {
You can’t perform that action at this time.
0 commit comments