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

remove default value on empty storage item #10

Merged
merged 4 commits into from
Nov 25, 2015
Merged

Conversation

kahlil
Copy link
Collaborator

@kahlil kahlil commented Nov 25, 2015

@laszlokorte this PR should do the trick, wanna review?

@laszlokorte
Copy link
Collaborator

Yes that's what I have imagined.

.filter((req) => req.key === key)
.map((req) => req.value)
.startWith(initialValue)

if (initialValue) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should check for initialValue!==null explicitly so allow falsy values like "" to be stored.

@kahlil
Copy link
Collaborator Author

kahlil commented Nov 25, 2015

added the type check

@laszlokorte
Copy link
Collaborator

Thank you

@kahlil
Copy link
Collaborator Author

kahlil commented Nov 25, 2015

no problem, will merge after the tests pass

should this be a major version bump or just minor?

@laszlokorte
Copy link
Collaborator

I think it should be a major again since somebody could rely on the empty item being emitted.

@kahlil
Copy link
Collaborator Author

kahlil commented Nov 25, 2015

yeah, I am thinking the same thing

kahlil added a commit that referenced this pull request Nov 25, 2015
remove default value on empty storage item
@kahlil kahlil merged commit 8d66afb into master Nov 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants