Closed phanect closed 9 years ago
First 2 commits are #10's. Plz merge after you merged #10.
And sorry again, but test is in progress.
I don't know how to respond null
by grunt-contrib-connect's middleware.
Do you know how to solve this?
Hi, thank you for your contributions, it's really great that you help fixing aja.js errors of youth.
I don't think you need to respond null
because JSON.parse(null)
returns null and does not trigger an Error, but if the value is undefined. You should just try with res.end();
And please, do not forget to add your details in the contributors
fields of the package.json
(if you're agree with that)
I don't think you need to respond null because JSON.parse(null) returns null and does not trigger an Error, but if the value is undefined.
Oh, then maybe empty string or something falsy is returned in my environment. Maybe if(res)
works, but it is considerable what value should be returned by test server.
On JSON access, if the server returns 200 and intentionally return no content, error is triggered.
JSON.parse(res)
tries to parse response content, but it is actually null (i.e. not JSON) and throws error.