Skip to content
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.

Cannot load an item from store if it is a string #18

Open
mshogren opened this issue Nov 14, 2017 · 3 comments
Open

Cannot load an item from store if it is a string #18

mshogren opened this issue Nov 14, 2017 · 3 comments
Labels

Comments

@mshogren
Copy link

mshogren commented Nov 14, 2017

I was using the jfs v0.2.6 from npm and everything was going well until I updated to v0.3.0

Now I can no longer do the following:

const Store = require('jfs');
const store = new Store('config.json', { type: 'single', pretty: true });
store.save('stringItem', 'asdf');
store.get('stringItem', console.log); // Error: could not load data

It appears that between the two versions items in the store have started to be checked for whether they are objects or not, where they used to be checked for null only.

@flosse flosse added the bug label Nov 14, 2017
@flosse
Copy link
Owner

flosse commented Nov 14, 2017

Thanks for reporting!
I'll have a look at it soon.

flosse added a commit that referenced this issue Nov 15, 2017
@flosse
Copy link
Owner

flosse commented Nov 15, 2017

I can reproduce the bug: 9f2b86f :)

flosse added a commit that referenced this issue Nov 22, 2017
@flosse
Copy link
Owner

flosse commented Mar 7, 2018

FYI: #19

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants