Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.

Optional callbacks need to default to emitting errors #6

Open
Raynos opened this issue Jan 22, 2015 · 0 comments
Open

Optional callbacks need to default to emitting errors #6

Raynos opened this issue Jan 22, 2015 · 0 comments

Comments

@Raynos
Copy link
Contributor

Raynos commented Jan 22, 2015

There are multiple locations where we do

if (callback) callback(err)

Instead we should

if (callback) {
  callback(err)
} else {
  this.emit('error', err)
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant