Fix duplicate stockRecord declaration in stock detail loader
This commit is contained in:
@@ -51,16 +51,6 @@ export async function loader({ params, request }: { params: { ticker: string };
|
||||
let orders = [];
|
||||
let bars = [];
|
||||
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 {
|
||||
// Fetch positions
|
||||
|
||||
Reference in New Issue
Block a user