Closed alqu closed 7 years ago
...or: does it mean: "if we have no strict mode setting, then -if the string is somewhat trueish - parse it?
Then I did not understand the logic in the first place.
strict mode will ensure this.request.body
always be an object.
Hi,
I noticed that there is a bug in here: https://github.com/cojs/co-body/blob/master/lib/json.js#L50
It should be
if (!strict) return str;
instead ofif (!strict) return str ? JSON.parse(str) : str;
Please fix :-)