-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
How frequently does the bug occur?
All the time
Description
When opening a Realm and passing in undefined as the sync property on the config the library should behave the same as if the key is missing entirely. This is currently not the case.
If the property is present but the value is undefined, opening the Realm will throw:
TypeError: Cannot read property 'newRealmFileBehavior' of undefined
The offending line is this: https://github.com/realm/realm-js/blob/master/lib/extensions.js#L167
It would be great to support opening the Realm as a local Realm if config.sync === true as well.
Stacktrace & log output
No response
Can you reproduce the bug?
Yes, always
Reproduction Steps
No response
Version
10.8.0
What SDK flavour are you using?
Local Database only
Are you using encryption?
No, not using encryption
Platform OS and version(s)
N/A
Build environment
No response