Skip to content

Conversation

@volkanunsal
Copy link
Contributor

I think Array.filter expects a boolean return value –– am I correct in assuming the callback function should be written like this?

(First time submitting a pull request on this repo.)

I think Array.filter expects a boolean return value, am I correct?
@vjeux
Copy link
Contributor

vjeux commented May 4, 2014

cc @fisherwebdev

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for catching this.

Style nits: please expand the anonymous function to three lines instead of putting it all on one line. Also please add the semicolon at the end.

var selectedPromises = _promises.filter(function(/*object*/ _, /*number*/ j) {
  return promiseIndexes.indexOf(j) !== -1;
});

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done and done done!

@zpao zpao added Flux labels May 5, 2014
vjeux added a commit that referenced this pull request May 6, 2014
@vjeux vjeux merged commit 52e1b42 into facebook:master May 6, 2014
@volkanunsal volkanunsal deleted the patch-1 branch May 6, 2014 23:46
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.

4 participants