Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: validator select should return if no callback #15

Merged

Conversation

vasco-santos
Copy link
Member

No description provided.

@vasco-santos vasco-santos requested a review from fsdiogo November 29, 2018 09:57
@ghost ghost assigned vasco-santos Nov 29, 2018
@ghost ghost added the status/in-progress In progress label Nov 29, 2018
src/index.js Outdated
callback(null, entryA.sequence > entryB.sequence ? 0 : 1)
const index = entryA.sequence > entryB.sequence ? 0 : 1

if (!callback) {
Copy link
Contributor

@fsdiogo fsdiogo Nov 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be more correct to do it like:

if (typeof callback !== 'function') {
  (...)
}

@vasco-santos vasco-santos merged commit 0845877 into master Nov 29, 2018
@ghost ghost removed the status/in-progress In progress label Nov 29, 2018
@vasco-santos vasco-santos deleted the fix/validator-select-should-return-if-no-callback branch November 29, 2018 11:44
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