Skip to content

Commit

Permalink
fix(remove): remove use emitting and default error handler
Browse files Browse the repository at this point in the history
ref #5
  • Loading branch information
tunnckoCore committed Nov 15, 2016
1 parent fba7d2c commit 724f35b
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,6 @@ utils.delegate(MiniBase.prototype, {
*/

use: function use (fn) {
/* istanbul ignore next */
if (!this.listeners('error').length && this.options.silent !== true) {
this.once('error', function defaultErrorHandler (err) {
console.log('MiniBase default error handler:', err.toString())
console.log(err.stack)
})
}

utils.tryCatchCallback.call(this, fn, {
passCallback: false,
args: [this]
Expand All @@ -245,7 +237,6 @@ utils.delegate(MiniBase.prototype, {
this.emit('error', err)
return
}
this.emit('use', fn, res)
}.bind(this))
return this
}
Expand Down

0 comments on commit 724f35b

Please sign in to comment.