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

+3 -1
View File
@@ -44,7 +44,9 @@ const isId = (value: unknown): value is string =>
/** A finding path no deeper than the tree allows, each id within the cap. */
const isPath = (path: unknown): path is string[] =>
Array.isArray(path) && path.length <= MAX_FINDING_PATH && path.every(isId)
Array.isArray(path) &&
path.length <= MAX_FINDING_PATH &&
Array.from(path).every(isId)
/** A finding or zone key as the tree builds it, or null when `raw` is no such key. */
function sanitizeKey(raw: unknown): ElementKey | null {