Skip to content

fix(android): throw error when value is null #259

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

Merged
merged 1 commit into from
Dec 7, 2019
Merged

Conversation

krizzu
Copy link
Member

@krizzu krizzu commented Nov 25, 2019

Summary:

Android did not show errors when null/undefined values were passed. This PR fixes that.

Closes #253

Test Plan:

  1. Try setting a null/undefined value to AsyncStorage.
  2. Note that errors where thrown.

@krizzu
Copy link
Member Author

krizzu commented Dec 3, 2019

@tido64 Checks are not done in get/set functions, where passing null or undefined as value throws an error from JS (it would be thrown from Native either way).

Copy link
Member

@tido64 tido64 left a comment

Choose a reason for hiding this comment

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

A few nitpicks only. Looks good otherwise 👍

@tido64 tido64 merged commit cddf98f into LEGACY Dec 7, 2019
@tido64 tido64 deleted the fix/null-values branch December 7, 2019 16:03
@tido64
Copy link
Member

tido64 commented Dec 7, 2019

Thanks, @krizzu ❤️

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.

Passing null or undefined as a value to setItem or multiSet doesn't result in an error.
2 participants