-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Cookies.get(undefined) returns all cookies #399
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
Comments
|
Closing due to the lack of feedback from the OP. If you want to continue the discussion, please comment here mentioning one of the project members. |
Hi there, I've recently hit a related issue - if I have the cookie name in a variable, and in some situations I need to be able to handle where that variable is not set, or it has a default value like null or empty string, in those cases it makes more sense to me for Honestly it just feels dangerous to use the same |
Opening due to @jackocnr feedback. In this case, we should be doing @jackocnr do you want to create a test and PR for this? |
Thanks for your response. I'm very busy at the mo, but I might be able to take a look one weekend if I find the time. |
Sure @jackocnr feel free to take the time it takes :) |
@jackocnr any news on this? |
Nope. It's still on my list, but I haven't found the time yet. |
I believe we can change return key ? jar[key] : jar to return arguments.length >= 1 ? jar[key] : jar Will tackle this later.. |
Ha, that would have worked if it was not for |
@carhartl Is it time to dump |
I didn't even think of that.. open a ticket and try to gather some thoughts? |
Dear developer,
When I use
Cookies.get()
method, I passing a undefined variable as a parameter intoget
method,bug returns all cookies,
I think,
Cookie.get()
method should checking the arguments length, ifarguments.length > 0
, this method shouldn't returns all the cookies, returns undefined would be better.Test Case:
expect
The text was updated successfully, but these errors were encountered: