Closed natew closed 7 years ago
Getters will not work, only functions are supported. The problem is, when you call sth like this:
Rx.collection({ methods: { get foobar() { return 'xxx'; } } })
Then the getter is assigned to the methods
object.
When RxDB reads all parameters from methods
it will also call the getter there instead of looking up the function.
Forgive my naivety, could you do:
Object.getPropertyDescriptors(methods).forEach(descriptor => {
if (typeof descriptor.get == 'function') { ... }
// or just Object.defineProperty(RxDatabase, propName, descriptor)
})
Case
Bug
Issue
Getters not working for methods
Info
Chrome
Code
Error: