Skip to content

fix: don't store the name when update throws across a split point - #395

Open
derdossi wants to merge 1 commit into
Rich-Harris:masterfrom
derdossi:fix/update-storename
Open

derdossi wants to merge 1 commit into
Rich-Harris:masterfrom
derdossi:fix/update-storename

Conversation

@derdossi

@derdossi derdossi commented Dec 3, 2026

Copy link
Copy Markdown

update()/overwrite() with storeName: true added the original text to the source map's names before checking for a split point. So a call that throws "cannot overwrite across a split point" still left a stray name in generateMap().names.

This moves the storedNames.add after that check, next to first.edit(...), and adds a test that fails without the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant