Skip to content

Fix deletion of falsy multimap values - #36

Open
feritcemkahraman wants to merge 1 commit into
github:masterfrom
feritcemkahraman:fix-falsy-value-deletion
Open

feritcemkahraman wants to merge 1 commit into
github:masterfrom
feritcemkahraman:fix-falsy-value-deletion

Conversation

@feritcemkahraman

Copy link
Copy Markdown

delete('key', 0) currently removes every value stored under the key. The same truthiness check makes drain(0) remove unrelated values and keys.

Distinguish the one-argument delete overload by argument count, so explicit falsy values (including undefined) go through Set.delete.

Seven regressions failed before the fix; all 25 Mocha tests, TypeScript declaration build and full ESLint pass. Existing whole-key deletion remains covered.

@feritcemkahraman
feritcemkahraman requested a review from a team as a code owner October 20, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant