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

replaces usage of Ember.keys with Object.keys to avoid [email protected] deprecation warnings #193

Merged
merged 1 commit into from
Jul 9, 2015

Conversation

makepanic
Copy link
Contributor

Replaces usage of Ember.keys with Object.keys to avoid [email protected] deprecation warnings:

see emberjs/ember.js#11511

@jherdman
Copy link
Contributor

jherdman commented Jul 9, 2015

This would effectively break anyone not ready to upgrade yet. Perhaps the following is more prudent for now:

var getKeys = Object.keys ? Object.keys : Ember.keys;

@makepanic
Copy link
Contributor Author

Currently mirage already uses Object.keys in some places: i.e. https://github.com/samselikoff/ember-cli-mirage/blob/afedb357c5d756897da310948700b176e4c0e177/addon/db.js#L93

That means the pull request wouldn't break mirage in browsers where it's already broken.
I agree we should either feature check Object.keys or put a warning message in the readme or something else.

@jherdman
Copy link
Contributor

jherdman commented Jul 9, 2015

👍

@samselikoff
Copy link
Collaborator

We could also use _.keys since we already have lodash

@makepanic
Copy link
Contributor Author

We could also use _.keys since we already have lodash

Sounds like the best solution. I rebased the commit and it now changes every *.keys to _.keys

@samselikoff
Copy link
Collaborator

you're the man!

samselikoff added a commit that referenced this pull request Jul 9, 2015
replaces usage of Ember.keys with Object.keys to avoid [email protected] deprecation warnings
@samselikoff samselikoff merged commit cc76596 into miragejs:master Jul 9, 2015
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