bugfixing

This commit is contained in:
MuslemRahimi 2024-09-16 22:05:56 +02:00
parent 9dc12f34ed
commit cea69f9349
2 changed files with 5 additions and 7 deletions

View File

@ -250,12 +250,12 @@ async function fetchPortfolio()
});
onDestroy(() => {
try {
//socket?.send('close')
socket?.close();
} catch (e) {
console.log(e);
if (socket) {
if (socket.readyState === WebSocket.OPEN) {
socket.close(); // Close the WebSocket connection
}
socket = null; // Ensure socket is set to null
}
//$displayCompanyName = '';
$currentPortfolioPrice = null;

View File

@ -50,8 +50,6 @@ export const load = async ({ parent, params }) => {
output = await response.json();
console.log(output);
setCache(params.tickerID, output, "getOptionsHistoricalData");
}