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

Ember.keys is deprecated in favor of Object.keys #71

Merged
merged 2 commits into from
Jul 2, 2015

Conversation

jpadilla
Copy link
Contributor

@jpadilla jpadilla commented Jul 2, 2015

emberjs/ember.js#11459 marks Ember.keys for deprecation in favor of Object.keys.

@@ -192,7 +192,7 @@ export default Klass.extend({
this.cache = this.cache || {};
this.cachedCalls = this.cachedCalls || {};

var keys = Ember.keys(callbacks);
var keys = Object.keys(callbacks);
Copy link
Member

Choose a reason for hiding this comment

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

Can you make this fall back to Ember.keys if Object.keys is not present? If we don't do that, we break older browser compat for Ember 1.13...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rwjblue would something like this do?

var keys = ('keys' in Object ? Object.keys : Ember.keys)(callbacks);

Copy link
Member

Choose a reason for hiding this comment

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

(Object.keys || Ember.keys)(callbacks) should do the trick, I think.

@jpadilla
Copy link
Contributor Author

jpadilla commented Jul 2, 2015

@rwjblue done

rwjblue added a commit that referenced this pull request Jul 2, 2015
Ember.keys is deprecated in favor of Object.keys
@rwjblue rwjblue merged commit f3f653a into emberjs:master Jul 2, 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.

None yet

2 participants