-
Notifications
You must be signed in to change notification settings - Fork 80
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
Optional options
is no longer optional with v3.2.0
#91
Comments
Hi @iamchucky, Can you show me an example that reproduces the error? There are various cases on the test suite where we use the |
I was not passing
example like above would work before 3.2.0 but throws error with 3.2.0 But now I realize that I should probably pass the callback function in as it is a required argument according to the documentation. |
Ah, that makes sense. I think it should still be easy to fix. I'll prepare a PR later today. |
This allows users to call the async functions in a fire and forget fashion. Fixes: #91 Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@iamchucky Can you give #93 a go? |
Check v4.0.1 |
I don't think #93 fixes this particular issue, when call electron-json-storage/lib/storage.js Line 269 in 8c0519c
|
Fixes: #91 Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Good point. What about v4.0.2? |
Due to the changes in v3.2.0, there are bugs when calling
storage.set(key, json, [options], callback)
withoutoptions
It throws error when trying to access
options.dataPath
at https://github.com/electron-userland/electron-json-storage/blob/master/lib/storage.js#L256I think we need to ensure
options
is set to{}
at https://github.com/electron-userland/electron-json-storage/blob/master/lib/storage.js#L251 and make sure all other similar methods do the same thing, like .get and .has .remove .clearThe text was updated successfully, but these errors were encountered: