Skip to content

Commit

Permalink
[Bugfix beta] Ember.keys works with null prototype objects correctly
Browse files Browse the repository at this point in the history
* container uses this to work correctly in < IE8
  • Loading branch information
stefanpenner committed Aug 18, 2014
1 parent fac79a1 commit 7db120f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 104 deletions.
2 changes: 1 addition & 1 deletion packages/container/lib/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ function instantiate(container, fullName) {

function eachDestroyable(container, callback) {
var cache = container.cache;
var keys = Object.keys(cache);
var keys = Ember.keys(cache);
var key, value;

for (var i = 0, l = keys.length; i < l; i++) {
Expand Down
2 changes: 1 addition & 1 deletion packages/ember-metal/lib/keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if (!keys || create.isSimulated) {
return;
}

if (typeof obj.hasOwnProperty === 'function' && !obj.hasOwnProperty(key)) {
if (!Object.prototype.hasOwnProperty.call(obj, key)) {
return;
}

Expand Down
1 change: 0 additions & 1 deletion packages/ember-runtime/lib/system/core_object.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ function makeCtor() {
*/
var CoreObject = makeCtor();
CoreObject.toString = function() { return "Ember.CoreObject"; };

CoreObject.PrototypeMixin = Mixin.create({
reopen: function() {
var length = arguments.length;
Expand Down
101 changes: 0 additions & 101 deletions packages/ember-runtime/tests/core/keys_test.js

This file was deleted.

0 comments on commit 7db120f

Please sign in to comment.