diff --git a/src/Errors/EleventyErrorHandler.js b/src/Errors/EleventyErrorHandler.js index 90ad4dc34..962cb8b7b 100644 --- a/src/Errors/EleventyErrorHandler.js +++ b/src/Errors/EleventyErrorHandler.js @@ -93,7 +93,7 @@ class EleventyErrorHandler { // Unwrap cause from error and assign it to what Eleventy expects if (nextRef?.cause) { - nextRef.originalError = nextRef.cause?.originalError || nextRef?.cause; + nextRef.originalError = nextRef.cause?.originalError ?? nextRef?.cause; } if (!nextRef && EleventyErrorUtil.hasEmbeddedError(ref.message)) {