Skip to content
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

Headers#delete returns true if the value exists. #2429

Closed
tsctx opened this issue Nov 13, 2023 · 0 comments · Fixed by #2430
Closed

Headers#delete returns true if the value exists. #2429

tsctx opened this issue Nov 13, 2023 · 0 comments · Fixed by #2430
Labels
bug Something isn't working

Comments

@tsctx
Copy link
Member

tsctx commented Nov 13, 2023

Bug Description

Headers#delete returns true if the value exists.

Reproducible By

console.log(new Headers({ "x": "0" }).delete("x")); // true
console.log(new Headers().delete("x")); // undefined

Expected Behavior

console.log(new Headers({ "x": "0" }).delete("x")); // undefined
console.log(new Headers().delete("x")); // undefined

Logs & Screenshots

> $ node
Welcome to Node.js v21.1.0.
Type ".help" for more information.
> new Headers({ "x": "0" }).delete("x")
true
> new Headers().delete("x")
undefined
>

Environment

Additional context

@tsctx tsctx added the bug Something isn't working label Nov 13, 2023
@tsctx tsctx changed the title Headers#detele returns true if the value exists. Headers#delete returns true if the value exists. Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant