Skip to content

Conversation

@jzlxiaohei
Copy link
Contributor

No description provided.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please be consistent with the project style.
In this case I'd rather write it as

if (index !== -1) {
  listeners.splice(index, 1);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: index > -1 - saved 2 chars!

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't mind either way. 😛
I was kind of a fan of > -1 for some time, but now I think !== -1 makes the intention clearer.
But whatever, I'm fine with either.

@gaearon
Copy link
Contributor

gaearon commented Oct 23, 2015

Thank you for the PR! I left a nit, will be happy to merge after it's fixed.

gaearon added a commit that referenced this pull request Oct 23, 2015
fixed unsubscribe bug for issue #938
@gaearon gaearon merged commit cb7f4fd into reduxjs:master Oct 23, 2015
@gaearon
Copy link
Contributor

gaearon commented Oct 23, 2015

I changed your fix to cover one more edge case: b7031ce

@jzlxiaohei
Copy link
Contributor Author

nice 🤘

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.

3 participants