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

Updating intersect helper to work with ManyArrays #341

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gmurphey
Copy link
Contributor

Changes proposed in this pull request

Currently the intersect helper returns an empty array when using an Ember Data has many relationship. This PR updates the way intersections are tested and accesses the members of a given array in a consistent and predictable way.

Thanks for the great addon!

Copy link
Contributor

@snewcomer snewcomer left a comment

Choose a reason for hiding this comment

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

💯

for (let j = 0; j < array.length; j++) {
if (array[j] === candidate) {
if (array.objectAt(j) === candidate) {
Copy link
Contributor

Choose a reason for hiding this comment

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

One question @gmurphey before merging - what makes this code as is on master not able to work with Ember arrays?

Copy link
Contributor

Choose a reason for hiding this comment

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

ping!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants