Skip to content

Conversation

@julien-f
Copy link
Contributor

@julien-f julien-f commented May 7, 2016

No description provided.

src/compose.js Outdated
export default function compose(...funcs) {
if (funcs.length === 0) {
const { length } = funcs
if (!length) {
Copy link
Member

Choose a reason for hiding this comment

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

I'd remove this variable extraction. You don't use it below. It's an unnecessary optimization.

@timdorr
Copy link
Member

timdorr commented May 7, 2016

Neat. The branching reads a bit better this way IMHO.

Can you add a test against the new return?

@julien-f
Copy link
Contributor Author

julien-f commented May 8, 2016

Done.

@gaearon gaearon merged commit 050d425 into reduxjs:master May 8, 2016
*/

export default function compose(...funcs) {
if (funcs.length === 0) {

Choose a reason for hiding this comment

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

Should I be using triple = ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep. It's strict equality.

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.

5 participants