diff --git a/src/processTemplate.ts b/src/processTemplate.ts index cb2bff8..ec9e5b1 100755 --- a/src/processTemplate.ts +++ b/src/processTemplate.ts @@ -439,7 +439,7 @@ export async function walkTemplate( if (ctx.gCntIf !== ctx.gCntEndIf) { const err = new IncompleteConditionalStatementError(); - if (ctx.options?.failFast) { + if (ctx.options.failFast) { throw err; } else { errors.push(err); @@ -449,7 +449,7 @@ export async function walkTemplate( if (ctx.loops.length > 0) { const innermost_loop = ctx.loops[ctx.loops.length - 1]; const err = new UnterminatedForLoopError(innermost_loop); - if (ctx.options?.failFast) { + if (ctx.options.failFast) { throw err; } else { errors.push(err);