Skip to content

Commit

Permalink
micro-perf: out of 1650/1800 calls superMethod is undefined.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanpenner committed Aug 20, 2014
1 parent 5e4af92 commit e325562
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ember-metal/lib/mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function giveDescriptorSuper(meta, key, property, values, descs) {
// it on the original object.
superProperty = superProperty || meta.descs[key];

if (!superProperty || !(superProperty instanceof ComputedProperty)) {
if (superProperty === undefined || !(superProperty instanceof ComputedProperty)) {
return property;
}

Expand All @@ -155,7 +155,7 @@ function giveMethodSuper(obj, key, method, values, descs) {
superMethod = superMethod || obj[key];

// Only wrap the new method if the original method was a function
if ('function' !== typeof superMethod) {
if (superMethod === undefined || 'function' !== typeof superMethod) {
return method;
}

Expand Down

0 comments on commit e325562

Please sign in to comment.