VulnerabilityHistoryProject / vulnerability-history

vulnerabilityhistory.org
MIT License
32 stars 5 forks source link

`null` as a string is appearing in various places #1166

Open andymeneely opened 9 months ago

andymeneely commented 9 months ago

For example, when I create a new curation, the nickname defaults to null

There may be more than one cause of this. I did some janky stopgap fixes (e.g. upvotes), but I didn't fix them all. I think there's got to be a JSON.stringify issue happening here or something. Instead of null these should be empty fields. For example, the value of description defaults to the string null when it should be an empty string.

brianravi commented 9 months ago

added a function to recursively loop through the object and set nulls to "". put in special case for upvotes to be 0.