Skip to content

Initialize seen trs based on initial state#4

Merged
smoores-dev merged 1 commit intomainfrom
handle-remount
Sep 19, 2025
Merged

Initialize seen trs based on initial state#4
smoores-dev merged 1 commit intomainfrom
handle-remount

Conversation

@smoores-dev
Copy link
Member

It's unsafe to assume that the initial EditorState doesn't have any tracked transactions. Initialize the seen ref based on the tracking state field from the initial EditorState, so that we don't try to apply mismatched transactions if we get an EditorState with existing transactions.

This specifically resolves an issue with remounting the CodeMirror component without re-initializing the EditorState.

@smoores-dev smoores-dev merged commit 70f8e5b into main Sep 19, 2025
1 check passed
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