fix(editor): forget the citing form on Back, refuse sparse paths
This commit is contained in:
1 parent
7a5684aace
commit
6c0f913104
5 files changed
+30
-3
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user