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(subscribe): allows functions where bind has been patched to be weird #6796

Closed
wants to merge 1 commit into from

Conversation

benlesh
Copy link
Member

@benlesh benlesh commented Feb 4, 2022

Apparently, code exists in the wild that will patch function bind to do something other than return a function that will execute the function instance, so we cannot rely on bind.

Resolves #6783

Apparently, code exists in the wild that will patch function bind to do something other than return a function that will execute the function instance, so we cannot rely on bind.

Resolves ReactiveX#6783
@getify
Copy link

getify commented Feb 5, 2022

This avoids the issue I specifically was seeing, but FTR... I think it creates an unnecessary "cost" for all other users. I would still just prefer an opt-out rather than either having all subscription functions bind(..)-bound, or having all subscription functions wrapped in an extra arrow-function. Neither option is the best IMO... the most preferable is to let users of Rx decide if they want the context binding or not.

@benlesh
Copy link
Member Author

benlesh commented Feb 8, 2023

A better fix for this was merged.

@benlesh benlesh closed this Feb 8, 2023
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.

subscribing fails with a function that doesn't have a normal bind()
2 participants