mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-10 10:10:34 -06:00
Fixes #934. `channel.merge` closes its sources by current index, sorted and in reverse, so `documents: [0, 0, 1]` passed validation and then ran `close(1)`, `close(0)`, `close(0)`; the last call removed whatever document had shifted into index 0, i.e. one that was never named, with its unsaved edits and history. Repeated indices are now rejected as bad params before anything is built or closed, and the first-source lookup no longer indexes the document list directly. Co-authored-by: wstock <1394687+wstock@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>