Skip to content

Commit 7a50208

Browse files
committed
Updated to v0.3.2, fixes invalid null check
1 parent fa22a7e commit 7a50208

4 files changed

+6
-5
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
JSONify is a minimal (less than a KB!) HTML-form to JSON to HTML-form converting plugin for jQuery. It creates JSON string from the name-and-value pair of form fields, and can perform JSON to form initialization.
44

5-
### Latest Release - v0.3
5+
### Latest Release - v0.3.2
66

77
Now includes support for loading data from JSON to form, AKA "deJSONify", just like `jsonify()` extracts data from the form fields, `dejsonify()` can assign JSON data back to form fields. See usage section for more.
88

@@ -75,6 +75,7 @@ Feel free to submit any issue OR helping to fix an issue.
7575
* 0.2 - Option can be provided whether to create JSON string or JSON object.
7676
* 0.3 - Support for JSON to form initialization added via method `dejsonify`.
7777
* 0.3.1 - Fixes incorrect value population with `dejsonify` when input types `radio` and `checkbox` are present in form.
78+
* 0.3.2 - Fix improper null check in `jsonify` method.
7879

7980

8081
## Author

dist/jquery.jsonify-0.3.1.min.js

-3
This file was deleted.

dist/jquery.jsonify-0.3.2.min.js

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jsonify.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
}, options);
66
var json = {};
77
$.each(this.serializeArray(), function() {
8-
if (json[this.name]) {
8+
if (this.name in json) {
99
if (!json[this.name].push)
1010
json[this.name] = [json[this.name]];
1111
json[this.name].push(this.value || '');

0 commit comments

Comments
 (0)