manually define each property in computed class helper - fixes #984

This commit is contained in:
Sebastian McKenzie 2015-03-11 07:45:29 +11:00
parent 8ba276b209
commit 056b90831d

View File

@ -1,13 +1,11 @@
(function() {
function defineProperties(target, rawProps) {
var props = {};
for (var i = 0; i < rawProps.length; i ++) {
var prop = rawProps[i];
function defineProperties(target, props) {
for (var i = 0; i < props.length; i ++) {
var prop = props[i];
prop.configurable = true;
if (prop.value) prop.writable = true;
props[prop.key] = prop;
Object.defineProperty(target, prop.key, prop);
}
Object.defineProperties(target, props);
}
return function (Constructor, protoProps, staticProps) {