Fix prototype mixin bug
This commit is contained in:
parent
a9cf0567ae
commit
fcb35cc3eb
|
@ -57,7 +57,7 @@ exports.mixin = function (newClass, mixinClass, options) {
|
|||
if (options.instanceProperties) {
|
||||
if (mixinClass.prototype) {
|
||||
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);
|
||||
Object.defineProperty(newClass.prototype, instanceProp, pd);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue