Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,14 @@ export async function registerInitialCache(
)
.then((data) => (isAppRouter ? data : (JSON.parse(data) as object)))
.catch((error) => {
console.warn(
"[CacheHandler] [%s] %s %s",
"registerInitialCache",
"Failed to read page data, assuming it does not exist",
`Error: ${error}`,
);
if (debug) {
console.warn(
"[CacheHandler] [%s] %s %s",
"registerInitialCache",
"Failed to read page data, assuming it does not exist",
`Error: ${error}`,
);
}

return undefined;
}),
Expand All @@ -294,12 +296,14 @@ export async function registerInitialCache(
.readFile(`${pathToRouteFiles}.prefetch.rsc`, "utf-8")
.then((data) => data)
.catch((error) => {
console.warn(
"[CacheHandler] [%s] %s %s",
"registerInitialCache",
"Failed to read page prefetch data, assuming it does not exist",
`Error: ${error}`,
);
if (debug) {
console.warn(
"[CacheHandler] [%s] %s %s",
"registerInitialCache",
"Failed to read page prefetch data, assuming it does not exist",
`Error: ${error}`,
);
}

return undefined;
})
Expand Down