Skip to content

fix: treat logically-deleted items as unknown parent in repair()#1

Open
LucasXu0 wants to merge 1 commit into
appflowy:mainfrom
LucasXu0:main
Open

fix: treat logically-deleted items as unknown parent in repair()#1
LucasXu0 wants to merge 1 commit into
appflowy:mainfrom
LucasXu0:main

Conversation

@LucasXu0

Copy link
Copy Markdown

A logically-deleted item (is_deleted flag set) cannot serve as a parent branch.

A logically-deleted item (is_deleted flag set) cannot serve as a
parent branch. yjs handles this by evaluating content.type, which
returns undefined for non-Type items (e.g. Format), silently
dropping the child. yrs only checked ItemContent::Deleted (GC state)
and missed the is_deleted() flag, causing a spurious InvalidParent
error on documents containing deleted Format items as parent refs.
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