Files
meet-hub/src
dwindown 269e384665 Fix chapter pollution when switching between lessons in curriculum editor
The issue was that handleEditLesson was setting lessonForm.chapters to a direct
reference of lesson.chapters instead of creating a copy. This caused mutations
to the form to also modify the lesson objects in the lessons array state.

When editing lesson 3 with chapters, then switching to edit lesson 2 (which had
no chapters), the form would still show lesson 3's chapters because it was
referencing the same array object.

Fix: Use spread operator [...lesson.chapters] to create a shallow copy of the
chapters array, preventing shared references between form state and lessons state.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-04 20:10:11 +07:00
..
2025-12-18 08:06:31 +00:00