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

More promise functions #1896

Merged
merged 3 commits into from Feb 4, 2017
Merged

More promise functions #1896

merged 3 commits into from Feb 4, 2017

Conversation

@timhuff
Copy link
Contributor

@timhuff timhuff commented Feb 3, 2017

This is #1894 only I created a branch that wasn't my master (that won't be changing) to submit it with.

let then = this.then();
then = then[method].apply(then, arguments);
return then;
const promise = this.then(identity);

This comment has been minimized.

@elhigu

elhigu Feb 3, 2017
Member

Why identity must be passed here?

This comment has been minimized.

@timhuff

timhuff Feb 3, 2017
Author Contributor

It doesn't need to be. Before I realize that .then doesn't need a parameter, in order to use bluebird's .get, I've been using .then(_.identity).get(0). I've pushed a commit to remove it.

@elhigu
Copy link
Member

@elhigu elhigu commented Feb 4, 2017

Looks good now, thanks!

@elhigu elhigu merged commit 0d55cfd into knex:master Feb 4, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
elhigu added a commit to elhigu/knex that referenced this pull request Feb 15, 2017
* Added failing tests

added more promise tests

* Added ability to use promise functions

* removed identity from promise handler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants