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

Sync configuration being undefined or missing entirely should produce the same behaviour #3999

Closed
kraenhansen opened this issue Oct 6, 2021 · 0 comments · Fixed by #4012
Closed
Assignees
Labels
First-Good-Issue First Good Issue - Relatively easy issue for new contributers T-Bug

Comments

@kraenhansen
Copy link
Member

kraenhansen commented Oct 6, 2021

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

@sync-by-unito sync-by-unito bot added the First-Good-Issue First Good Issue - Relatively easy issue for new contributers label Oct 8, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
First-Good-Issue First Good Issue - Relatively easy issue for new contributers T-Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants