Skip to content

Commit 89e8f6f

Browse files
committed
fix: inline missing helper functions in chart HTML template
`lp_chart_core.ts` generates a self-contained HTML page with inline JS. The template referenced `roundTo`, `fixedTo`, and `roundToDecimals` from `math_utils` but never inlined them via `.toString()`, causing `ReferenceError` in the browser — rendered the chart as a blank page. ## Fix Added `.toString()` inlining for all three functions after `padRange.toString()`, matching the pattern already used for `escapeHtml`, `formatPct`, and `padRange`. ## Testing Notes - Verified generated HTML now contains all three function definitions - Chart renders correctly at http://localhost:8080/.../OPTIMIZED_AMA.html
1 parent c626354 commit 89e8f6f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

market_adapter/lp_chart_core.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,12 @@ ${formatPct.toString()}
291291
292292
${padRange.toString()}
293293
294+
${roundTo.toString()}
295+
296+
${fixedTo.toString()}
297+
298+
${roundToDecimals.toString()}
299+
294300
function formatCompactNumber(v) {
295301
const num = Number(v);
296302
if (!Number.isFinite(num)) return 'n/a';

0 commit comments

Comments
 (0)