Skip to content

Cookies.get(undefined) returns all cookies #399

@sammok

Description

@sammok

Dear developer,

When I use Cookies.get() method, I passing a undefined variable as a parameter into get method,

bug returns all cookies,

I think, Cookie.get() method should checking the arguments length, if arguments.length > 0, this method shouldn't returns all the cookies, returns undefined would be better.

Test Case:

console.log(Cookies.get(), Cookies.get(undefined), Cookies.get(null))
output: {}, {}, {}

expect

console.log(Cookies.get(), Cookies.get(undefined), Cookies.get(null))
output: {}, undefined, undefined

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions