Skip to content

Commit

Permalink
Revert "Merge pull request #31 from dallonf/master"
Browse files Browse the repository at this point in the history
This reverts commit 549b91b, reversing
changes made to 073849f.
  • Loading branch information
STRML committed Nov 6, 2015
1 parent 4ad5ea4 commit 9f7f864
Show file tree
Hide file tree
Showing 2 changed files with 215 additions and 276 deletions.
18 changes: 2 additions & 16 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,26 +138,12 @@ module.exports = (function() {
var reactMixin = mixinProto;

reactMixin.onClass = function(reactClass, mixin) {
var mixinClone = assign({}, mixin);
return mixinClass(reactClass, mixinClone);
return mixinClass(reactClass, mixin);
};

reactMixin.decorate = function(mixin) {
return function(reactClass) {
// Clone the incoming class
var newClass = function(props) {
reactClass.apply(this, arguments);
};
Object.setPrototypeOf(newClass, reactClass);
newClass.prototype = Object.create(reactClass.prototype, {
constructor: {
value: newClass,
enumerable: false,
writable: true,
configurable: true
}
});
return reactMixin.onClass(newClass, mixin);
return reactMixin.onClass(reactClass, mixin);
};
};

Expand Down
Loading

0 comments on commit 9f7f864

Please sign in to comment.