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

Default Behaviour for store.get(undefined) #283

Open
Bug-Reaper opened this issue Sep 30, 2024 · 1 comment
Open

Default Behaviour for store.get(undefined) #283

Bug-Reaper opened this issue Sep 30, 2024 · 1 comment

Comments

@Bug-Reaper
Copy link

Bug-Reaper commented Sep 30, 2024

I've just realized that the default behavior of getting undefined resolves the entire store w/any error or warning. Is an error or warning desirable for case of bad input args?

let u;
let storedu = store.get(u);
console.log(storedu);
// Lists entire contents of the satore

If so, happy to PR.

Repository owner deleted a comment from ASDFGHFgdh Feb 4, 2025
Repository owner deleted a comment from ASDFGHFgdh Feb 4, 2025
Repository owner deleted a comment from ASDFGHFgdh Feb 4, 2025
@sindresorhus
Copy link
Owner

sindresorhus commented Feb 4, 2025

It should throw a user-friendly error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants