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

Switch to ES6 Set #75

Open
gordonkristan opened this issue Aug 24, 2015 · 2 comments
Open

Switch to ES6 Set #75

gordonkristan opened this issue Aug 24, 2015 · 2 comments

Comments

@gordonkristan
Copy link
Contributor

We need to get rid of the cherry-picked Ember Set implementation and use the ES6 set instead.

@mtheoryx
Copy link
Contributor

Just ran into an interesting issue possibly relating to this or issue #38 when trying out ember-graph latest.

We're using the withoutAll() method, but getting an error on ember 1.8.1 and the Oct 25th release of ember graph:

TypeError: existingBands.withoutAll is not a function

@gordonkristan
Copy link
Contributor Author

It's been a long time so I can't remember exactly, but this might be because I'm no longer extending the built-in Set class. Because Ember.Set doesn't exist in Ember 2.0 anymore, I polyfill it to EmberGraph.Set and use that class instead. You can either switch to using EG.Set instead of Em.Set, or you can add this polyfill somewhere:

Ember.Set.reopen({
    withoutAll(items) {
        const ret = this.copy();
        ret.removeObjects(items);
        return ret;
    }
});

I think this behavior changed sometime in August, so to your point about the release process: we really need release notes. 😄

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

No branches or pull requests

2 participants