vasern / vasern

Vasern is a fast, lightweight and open source data storage for React Native

Home Page:https://vasern.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

key in props setting to null

apppro123 opened this issue · comments

It is not quite an issue.
If i for example insert data and i set one of the key in props to null it first gives back the whole object with key value null (or undefined), but if i then reload the app, all the key set to null or undefined now have the value "".
I would prefer if these keys would not be defined then having a string like that "".

Thank you for your response!

Hi Noah, thanks for bringing this up.

I am aware of the case. At the moment, data is saved as strings in the data file, it might be an issue when using null vs empty string (""). For example it could lead to issue similar to #14.

One little hack is you can define your own rule and check it. For example, you can save property value as a string ("null") then when load it, check if prop === "null".

It is a limitation of this version, I will see what's best and make an improvement for this case