localForage / localForage/localForage-memoryStorageDriver

getItem() should return null on not found key

Open
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
17
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Hi!
getItem() is returned _undefined_ for a non registered key but as per [API](https://localforage.github.io/localForage/#data-api-getitem), it should return _null_.
I guess that iterate() suffers the same problem, but I haven't tried.

Thank you!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating getItem() in the JavaScript memory storage driver and compare its missing-key result with the localForage data API linked in the issue. Verify the not-found behavior, then check iterate() separately only if its behavior is confirmed; done means getItem() returns null for an unregistered key.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
database
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.