Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
mixin wrapper must not squelch return values
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott J. Miles committed Dec 16, 2013
1 parent 4652afd commit 1c59018
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/declaration/prototype.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,13 @@
},
mixinMethod: function(extended, prototype, api, name) {
var $super = function(args) {
prototype[name].apply(this, args);
return prototype[name].apply(this, args);
};
extended[name] = function() {
this.super = $super;
api[name].apply(this, arguments);
var value = api[name].apply(this, arguments);
this.super = extended.super;
return value;
}
},
// ensure prototype[name] inherits from a prototype.prototype[name]
Expand Down

0 comments on commit 1c59018

Please sign in to comment.