Fix prototype mixin bug

This commit is contained in:
Ritchie Martori 2013-10-11 18:37:45 -07:00
parent a9cf0567ae
commit fcb35cc3eb
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ exports.mixin = function (newClass, mixinClass, options) {
if (options.instanceProperties) { if (options.instanceProperties) {
if (mixinClass.prototype) { if (mixinClass.prototype) {
Object.keys(mixinClass.prototype).forEach(function (instanceProp) { Object.keys(mixinClass.prototype).forEach(function (instanceProp) {
if (!newClass.hasOwnProperty(instanceProp) || options.override) { if (!newClass.prototype.hasOwnProperty(instanceProp) || options.override) {
var pd = Object.getOwnPropertyDescriptor(mixinClass.prototype, instanceProp); var pd = Object.getOwnPropertyDescriptor(mixinClass.prototype, instanceProp);
Object.defineProperty(newClass.prototype, instanceProp, pd); Object.defineProperty(newClass.prototype, instanceProp, pd);
} }