fix(editor): forget the citing form on Back, refuse sparse paths

This commit is contained in:
bchanot committed 2026-11-15 17:42:26 +01:00
1 parent 7a5684aace
commit 6c0f913104
5 files changed
+30 -3

No files matched your search

@@ -412,4 +412,11 @@ describe('final review: read-back values are capped', () => {
const sheet = { ...edit, finding: { key: node, citations: true } }
expect(sanitizeView(sheet)?.reference).toBeNull()
})
it('drops a key whose path is a sparse array', () => {
const path: string[] = []
path[1] = 'n'
const sparse: ElementKey = { kind: 'finding', zone_id: 'z', path }
expect(sanitizeView(onFindings(sparse))?.finding).toBeNull()
})
})