You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I realize that localForage has taken the stance that looking up a non-existent key should resolve with null instead of reject with an error, but could we make this an optional thing? Maybe a second argument to getItem? I'd be happy to make a PR for it, if everyone likes the idea.
The biggest con is that it wouldn't work reliably if you want to retrieve the value null, but I don't plan on ever doing that in my use case, so... And, if we take the tack of making it a second, optional parameter on getItem, you can still retrieve null if you wanted to.
If not, I'm just going to wrap the $localForage service in my own service, so NBD if we don't want to deviate from localForage, but I thought I'd offer to push this upstream since it's a non-breaking change.
The text was updated successfully, but these errors were encountered:
I realize that localForage has taken the stance that looking up a non-existent key should resolve with null instead of reject with an error, but could we make this an optional thing? Maybe a second argument to
getItem
? I'd be happy to make a PR for it, if everyone likes the idea.The biggest con is that it wouldn't work reliably if you want to retrieve the value null, but I don't plan on ever doing that in my use case, so... And, if we take the tack of making it a second, optional parameter on
getItem
, you can still retrieve null if you wanted to.If not, I'm just going to wrap the
$localForage
service in my own service, so NBD if we don't want to deviate from localForage, but I thought I'd offer to push this upstream since it's a non-breaking change.The text was updated successfully, but these errors were encountered: