Skip to content

Commit

Permalink
replace || with ?? when assigning to nextRef.originalError
Browse files Browse the repository at this point in the history
  • Loading branch information
noelforte committed Dec 6, 2024
1 parent e6368f8 commit 3935776
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Errors/EleventyErrorHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 3935776

Please sign in to comment.