Files
railsgoat/app
Ken Johnson 102a879a3a Fix EasyPieChart errors on admin dashboard
Fixed "Cannot read properties of undefined (reading 'update')" errors
caused by chart setTimeout callbacks persisting across Turbolinks page
navigations.

Changes:
- Add existence checks before initializing charts
- Guard all .update() calls with element and instance checks
- Track all setTimeout IDs in chartTimeouts array
- Clear timeouts on Turbolinks navigation events
- Clear timeouts at start of pieChartHome() to prevent duplicates

This ensures chart update callbacks only run when chart elements exist
on the page, preventing errors when navigating to pages without charts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 00:57:54 -05:00
..
2018-03-08 17:02:24 -05:00