fix(canvas): auto-initialize courier network canvas on DOM load
CI / Build & Quality Check (push) Waiting to run

This commit is contained in:
Amirul Islam Redwan71
2026-11-12 19:41:50 +06:00
parent 30127d970b
commit c37ae2f441
+11
View File
@@ -246,3 +246,14 @@ function initCourierCanvas(canvasId = 'hubmap') {
start(); start();
} }
} }
// Auto-initialize canvas on page load
if (typeof window !== 'undefined') {
window.initCourierCanvas = initCourierCanvas;
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', () => initCourierCanvas('hubmap'));
} else {
initCourierCanvas('hubmap');
}
}