diff --git a/src/utility/ppr.ts b/src/utility/ppr.ts index e38c3e4a..da969ee8 100644 --- a/src/utility/ppr.ts +++ b/src/utility/ppr.ts @@ -6,10 +6,10 @@ export const screenForPPR = ( // PPR errors, if caught, must be re-thrown in order to // postpone rendering - if (error.sourceError?.message.includes('ppr-caught-error')) { + if (error.sourceError?.message?.includes('ppr-caught-error')) { console.log( sourceToLog ? `${sourceToLog}: PPR error caught` : 'PPR error caught', - error.sourceError.message, + error.sourceError?.message, ); throw error.sourceError.message; } else if (error.message?.includes('ppr-caught-error')) {