Fix duplicate stockRecord declaration in stock detail loader

This commit is contained in:
2026-05-16 14:35:43 +02:00
parent f2b7fad379
commit 528045c25e
-10
View File
@@ -51,16 +51,6 @@ export async function loader({ params, request }: { params: { ticker: string };
let orders = []; let orders = [];
let bars = []; let bars = [];
let stockRecord: any = null; let stockRecord: any = null;
let stockRecord: any = null;
try {
const stockRes = await fetch(`${baseUrl}/api/stocks`);
if (stockRes.ok) {
const list = await stockRes.json();
stockRecord = list.find((s: any) => s.ticker === ticker) || null;
}
} catch (e) {
// ignore
}
try { try {
// Fetch positions // Fetch positions