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

Set a state to undefined will lost it #52

Closed
eon-lee96 opened this issue Nov 8, 2018 · 3 comments
Closed

Set a state to undefined will lost it #52

eon-lee96 opened this issue Nov 8, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@eon-lee96
Copy link

HI

I am a bit confused about this line of code.

class Counter extends VuexModule {
   counter = undefined; // it will lost in the state
}

Is it necessary to check if the state is undefined?

BTW: My English sucks...forgive me

@championswimmer championswimmer added the bug Something isn't working label Nov 8, 2018
@championswimmer
Copy link
Owner

true, we can probably not check against undefined. but I can't remember why I put it in the first place, must have been some issue. I'll check on it

@FlorianWendelborn
Copy link
Contributor

@championswimmer Is it possible that this is a side-effect of getters that don’t return anything and undefined is checking for that? I can’t think of anything else that could make this check necessary.

@FlorianWendelborn
Copy link
Contributor

FlorianWendelborn commented Dec 22, 2018

@Leeehang this issue seems like a duplicate of #35.

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

No branches or pull requests

3 participants