File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
packages/nextjs-cache-handler Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1010 "type" : " git" ,
1111 "url" : " git+https://github.com/fortedigital/nextjs-cache-handler.git"
1212 },
13- "version" : " 1.1.0 " ,
13+ "version" : " 1.1.1 " ,
1414 "type" : " module" ,
1515 "license" : " MIT" ,
1616 "description" : " Next.js cache handlers" ,
Original file line number Diff line number Diff line change @@ -19,7 +19,11 @@ export default function bufferStringDecorator(handler: Handler): Handler {
1919 const hit = await handler . get ( key , ctx ) ;
2020 const staticPageCacheData =
2121 hit ?. value as unknown as ConvertedStaticPageCacheData ;
22- if ( hit ?. value && staticPageCacheData ?. body ) {
22+ if (
23+ hit ?. value &&
24+ ( staticPageCacheData ?. kind as string ) === "APP_ROUTE" &&
25+ staticPageCacheData ?. body
26+ ) {
2327 return {
2428 ...hit ,
2529 value : {
@@ -32,8 +36,8 @@ export default function bufferStringDecorator(handler: Handler): Handler {
3236 } ,
3337
3438 async set ( key , data ) {
35- const routeValue = data . value as CachedRouteValue ;
36- if ( routeValue ?. kind === "ROUTE " && routeValue ?. body ) {
39+ const routeValue = data . value as unknown as CachedRouteValue ;
40+ if ( ( routeValue ?. kind as string ) === "APP_ROUTE " && routeValue ?. body ) {
3741 await handler . set ( key , {
3842 ...data ,
3943 value : {
You can’t perform that action at this time.
0 commit comments