fix: loadTrades before chart init + try-catch for CDN failure
- Reorder init(): loadTrades() runs first, charts second - Wrap chart init in try-catch so UI survives CDN issues - Update start.sh to detect changes in embedded .html/.js/.css
This commit is contained in:
+3
-3
@@ -610,10 +610,10 @@ window.closeTradeDetail = closeTradeDetail;
|
||||
// ---- Init ----
|
||||
function init() {
|
||||
connectSSE();
|
||||
initPriceChart();
|
||||
initSpreadChart();
|
||||
loadTrades();
|
||||
loadTrades(); // run before charts in case Chart CDN is slow
|
||||
setInterval(loadTrades, 10000);
|
||||
try { initPriceChart(); } catch(e) { console.warn('Price chart init failed:', e); }
|
||||
try { initSpreadChart(); } catch(e) { console.warn('Spread chart init failed:', e); }
|
||||
}
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
|
||||
Reference in New Issue
Block a user