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

getItem returns null for unknown key #58

Merged
merged 1 commit into from Mar 11, 2015
Merged

Conversation

psalaets
Copy link
Contributor

@psalaets psalaets commented Mar 9, 2015

This fixes #55

Changes

  • getItem now returns null for unknown key
  • Changed tests for removeItem and pull that were doing expect(...).toBeUndefined()

Note

When given an array of keys like ['known1', 'unknown', 'known2'], getItem returns [value1, undefined, value2]. Maybe that 2nd value should be null for consistency?

I left it as is since getItem(array) doesn't have an analog in localforage. Being different from localforage was the source of confusion in #55.

@ocombe
Copy link
Collaborator

ocombe commented Mar 11, 2015

Thanks!!

ocombe added a commit that referenced this pull request Mar 11, 2015
fix: getItem returns null for unknown key
@ocombe ocombe merged commit cca7fdc into scotttrinh:master Mar 11, 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.

getItem returns undefined for un-found key (rather than null)
2 participants