diff --git a/src/routes/etf/[tickerID]/options/hottest-contracts/+page.svelte b/src/routes/etf/[tickerID]/options/hottest-contracts/+page.svelte
index fb71a9f6..c75885cf 100644
--- a/src/routes/etf/[tickerID]/options/hottest-contracts/+page.svelte
+++ b/src/routes/etf/[tickerID]/options/hottest-contracts/+page.svelte
@@ -132,8 +132,8 @@
// Convert the expiration date to a Date object
const expirationDate = new Date(dateExpiration);
- return data.map((item) => {
- const itemDate = new Date(item.date); // Convert item.date to a Date object
+ return data?.map((item) => {
+ const itemDate = new Date(item?.date); // Convert item.date to a Date object
const timeDifference = expirationDate - itemDate; // Difference in milliseconds
const dte = Math.ceil(timeDifference / (1000 * 60 * 60 * 24)); // Convert ms to days
@@ -304,7 +304,6 @@
let data = rawDataHistory?.sort(
(a, b) => new Date(a?.date) - new Date(b?.date),
);
- console.log(data);
let dates = data?.map((item) => item?.date);
let avgPrice = data?.map((item) => item?.avg_price);
let priceList = data?.map((item) => item?.price);
@@ -430,7 +429,7 @@
// Add DTE at the end if the data point exists
if (rawDataPoint?.dte !== undefined) {
- result += `DTE: ${rawDataPoint.dte}
`;
+ result += `Days to Expiration : ${rawDataPoint.dte}
`;
}
return result;
diff --git a/src/routes/stocks/[tickerID]/options/hottest-contracts/+page.svelte b/src/routes/stocks/[tickerID]/options/hottest-contracts/+page.svelte
index af48c937..a484a1fd 100644
--- a/src/routes/stocks/[tickerID]/options/hottest-contracts/+page.svelte
+++ b/src/routes/stocks/[tickerID]/options/hottest-contracts/+page.svelte
@@ -304,7 +304,6 @@
let data = rawDataHistory?.sort(
(a, b) => new Date(a?.date) - new Date(b?.date),
);
- console.log(data);
let dates = data?.map((item) => item?.date);
let avgPrice = data?.map((item) => item?.avg_price);
let priceList = data?.map((item) => item?.price);
@@ -428,9 +427,8 @@
result += `${bidColor}Bid x ${askColor}Ask: ${bidValue} x ${askValue}
`;
}
- // Add DTE at the end if the data point exists
if (rawDataPoint?.dte !== undefined) {
- result += `DTE: ${rawDataPoint.dte}
`;
+ result += `Days to Expiration : ${rawDataPoint.dte}
`;
}
return result;