From e148dad4633e74bd2b129e99c30ad2efde40f27f Mon Sep 17 00:00:00 2001 From: Horizontal42 <75383519+Horizontal42@users.noreply.github.com> Date: Wed, 12 Aug 2026 22:01:10 +0300 Subject: [PATCH] fix: move misplaced comment in evaluation engine catch block Moved the informational comment `// a line without a result beats a dead sheet.` to the correct location in the catch block right above `value = null;`, where it accurately describes why we assign null instead of crashing. --- src/engine/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/index.ts b/src/engine/index.ts index 5d6e82e..ea713b5 100644 --- a/src/engine/index.ts +++ b/src/engine/index.ts @@ -137,7 +137,6 @@ export class SumEngine { historicalRates: this.historicalRates, resolveXRef, }; - // a line without a result beats a dead sheet. value = evaluate(parsed.expr, ctx); } } catch (e) { @@ -150,6 +149,7 @@ export class SumEngine { lineError = e instanceof Error ? e.message : String(e); console.warn("evaluate failed:", e); } + // a line without a result beats a dead sheet. value = null; } if (value?.kind === "quantity" && !value.value.isFinite()) value = null;