define class methods instead of assigning them - fixes #454
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
"use strict";
|
||||
|
||||
var _prototypeProperties = function (child, staticProps, instanceProps) {
|
||||
if (staticProps) Object.defineProperties(child, staticProps);
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var BaseView = function BaseView() {
|
||||
this.autoRender = true;
|
||||
};
|
||||
@@ -11,9 +16,16 @@ var BaseView = function () {
|
||||
var BaseView = (function () {
|
||||
var _class2 = function () {};
|
||||
|
||||
_class2.prototype.foo = function () {
|
||||
this.autoRender = true;
|
||||
};
|
||||
_prototypeProperties(_class2, null, {
|
||||
foo: {
|
||||
value: function () {
|
||||
this.autoRender = true;
|
||||
},
|
||||
writable: true,
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
|
||||
return _class2;
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user