set decorated initialisers that have no initialiser to undefined
This commit is contained in:
parent
23cf77746d
commit
547aaac0c0
@ -7,7 +7,7 @@
|
||||
for (var _key in _descriptor) descriptor[_key] = _descriptor[_key];
|
||||
|
||||
// initialize it
|
||||
descriptor.value = descriptor.initializer.call(target);
|
||||
descriptor.value = descriptor.initializer ? descriptor.initializer.call(target) : undefined;
|
||||
|
||||
Object.defineProperty(target, key, descriptor);
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user