Skip to content

fix(super-converter): add null guards to decodeRPrFromMarks (SD-2023)#2638

Closed
caio-pizzol wants to merge 2 commits intomainfrom
caio/sd-2023-null-guards-decode-rpr
Closed

fix(super-converter): add null guards to decodeRPrFromMarks (SD-2023)#2638
caio-pizzol wants to merge 2 commits intomainfrom
caio/sd-2023-null-guards-decode-rpr

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

Tracked format snapshots can contain sparse marks (missing attrs) or null entries in the marks array. Without guards, mark.type.name and mark.attrs throw on these inputs.

  • Add null/undefined checks for mark and mark.type
  • Default mark.attrs to {} for sparse marks
  • Replace all mark.attrs references with the safe attrs local
  • Add tests for sparse marks and null entries

Follows up on #2395 which fixed the core tracked formatting export bug but didn't include these defensive guards.

SD-2023

…e marks

Tracked format snapshots can contain sparse marks (missing attrs) or
null entries. Without guards, mark.type.name and mark.attrs throw.
@linear
Copy link
Copy Markdown

linear Bot commented Mar 30, 2026

@caio-pizzol caio-pizzol enabled auto-merge (squash) March 30, 2026 14:43
@caio-pizzol caio-pizzol disabled auto-merge March 30, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant