Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip defining getter and setter when property not defined in schema #646

Closed
wants to merge 1 commit into from

Conversation

hubgit
Copy link
Contributor

@hubgit hubgit commented May 17, 2018

This PR contains:

A BUGFIX?

Describe the problem you have without this PR

I'm using RxDB in an app that defines only a minimal schema for each object, as there are lots of different types of object stored in the same collection. I've found that calling get(x) on a document, when the property at x is an object or array, calls _defineGetterSetter which tries to get the schema for the property, which is null when there's no schema defined for this path, causing an exception to be thrown.

@pubkey
Copy link
Owner

pubkey commented May 18, 2018

Hi @hubgit
thank you for the PR.
Can you add a test-case that fails without this change?
Just to ensure this still works after refactors. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants