Merge pull request #61 from jonathanong/onerror-condition
onerror: check existence of error
This commit is contained in:
commit
881490299c
1 changed files with 5 additions and 0 deletions
|
@ -644,6 +644,11 @@ module.exports = {
|
|||
*/
|
||||
|
||||
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
|
||||
// than delegate to the app-level
|
||||
// handler and log.
|
||||
|
|
Loading…
Reference in a new issue