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 issue with isBehavior return true for arrays #97

Merged
merged 1 commit into from
Oct 15, 2021
Merged

Conversation

limemloh
Copy link
Member

@limemloh limemloh commented Sep 4, 2021

Purpose

Browsers are introducing an at function on arrays, which makes the isBehavior function return true for arrays.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at

Changes

  • isBehavior now also checks for a "pull" property.

@paldepind
Copy link
Member

What about only checking for pushB instead of both at and pull? pushB seems like a name that is fairly unlikely to collide with anything.

@limemloh
Copy link
Member Author

limemloh commented Sep 7, 2021

What about only checking for pushB instead of both at and pull? pushB seems like a name that is fairly unlikely to collide with anything.

That sounds more reasonable, but it seems to give some issues
this future for example https://github.com/funkia/hareactive/blob/master/src/future.ts#L242

@stevekrouse
Copy link
Contributor

stevekrouse commented Sep 10, 2021

Confirmed that this PR fixes the issue for all the browsers it was bugging on for me before

@limemloh limemloh merged commit 92f2fad into master Oct 15, 2021
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