mirror of
https://github.com/marcogll/ap_pos.git
synced 2026-01-13 21:25:16 +00:00
The dashboard was entering an infinite rendering loop, causing the browser to hang and eventually crash. This was likely due to Chart.js's responsive feature triggering a continuous cycle of updates and resizes.
This commit addresses the issue by:
- Modifying `loadDashboardData` to be more robust.
- Calling `incomeChart.update('none')` to prevent animation-related rendering loops.
- Adding a check to ensure the dashboard is still active before updating the DOM, preventing race conditions.
- Improving the re-entrancy guard and error handling within the function.
20 KiB
20 KiB