fix: let not const for state (reassigned in init block)

This commit is contained in:
Manohar 2026-05-12 05:49:11 +00:00
parent c46570171a
commit cdddefc6a9

View file

@ -113,7 +113,7 @@ async function evaluateAlerts(positions: Position[], today: string): Promise<voi
const openPositions = positions.filter(p => p.netqty !== 0);
for (const pos of openPositions) {
const _raw = getBandState.get(pos.key) as any;
const state: BandState | undefined = _raw ? {
let state: BandState | undefined = _raw ? {
positionKey: _raw.position_key,
anchorPnl: _raw.anchor_pnl,
lastAlertPnl: _raw.last_alert_pnl,