Skip to content

Update development dependencies #288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/SearchableMap/SearchableMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ const remove = <T = any>(tree: RadixTree<T>, key: string): void => {
if (node.size === 0) {
cleanup(path)
} else if (node.size === 1) {
const [key, value] = node.entries().next().value
merge(path, key, value)
const [key, value] = node.entries().next().value!
merge(path, key as string, value as RadixTree<T>)
}
}

Expand All @@ -404,9 +404,9 @@ const cleanup = <T = any>(path: Path<T>): void => {
if (node!.size === 0) {
cleanup(path.slice(0, -1))
} else if (node!.size === 1) {
const [key, value] = node!.entries().next().value
const [key, value] = node!.entries().next().value!
if (key !== LEAF) {
merge(path.slice(0, -1), key, value)
merge(path.slice(0, -1), key as string, value as RadixTree<T>)
}
}
}
Expand Down
Loading
Loading