Merge pull request #61 from jonathanong/onerror-condition

onerror: check existence of error
This commit is contained in:
Jonathan Ong 2013-10-10 11:11:10 -07:00
commit 881490299c

View file

@ -644,6 +644,11 @@ module.exports = {
*/ */
onerror: function(err){ onerror: function(err){
// don't do anything if there is no error.
// this allows you to pass `this.onerror`
// to node-style callbacks.
if (!err) return;
// nothing we can do here other // nothing we can do here other
// than delegate to the app-level // than delegate to the app-level
// handler and log. // handler and log.