Skip to content

Conversation

@feross
Copy link
Member

@feross feross commented Mar 2, 2017

It's non-standard for a callback function to take a non-error argument
in the first position.

So instead of the filter callback accepting three types of arguments:

cb(true) // allowed
cb(false) // disallowed
cb(new Error('custom message')) // disallowed with custom message

It now accepts two forms:

cb(new Error('custom message')) // disallowed with custom message
cb(null) // allowed

It's non-standard for a callback function to take a non-error argument
in the first position.

So instead of the filter callback accepting three types of arguments:

cb(true) // allowed
cb(false) // disallowed
cb(new Error('custom message')) // disallowed with custom message

It now accepts two forms:

cb(new Error('custom message')) // disallowed with custom message
cb(null) // allowed
@feross
Copy link
Member Author

feross commented Mar 2, 2017

This will be a breaking change in the standard v10 beta, so I'm fixing this early.

@feross feross merged commit e4eb1a8 into master Mar 2, 2017
@feross feross deleted the filter-cb branch March 2, 2017 06:57
@feross
Copy link
Member Author

feross commented Mar 2, 2017

Released as 9.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants