Skip to content

Commit

Permalink
Restore default for client reset (#6261)
Browse files Browse the repository at this point in the history
* Restore default for client reset

---------

Co-authored-by: Andrew Meyer <[email protected]>
Co-authored-by: LJ <[email protected]>
Co-authored-by: Kræn Hansen <[email protected]>
  • Loading branch information
4 people authored Nov 22, 2023
1 parent d9e1b00 commit de3062e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* Fixed an error "Invalid schema change (UPLOAD): cannot process AddColumn instruction for non-existent table" when using automatic client reset with recovery in dev mode to recover schema changes made locally while offline. ([realm/realm-core#7042](https://github.com/realm/realm-core/pull/7042))
* When place an embedded object would create a new object and keep the original object too. ([#6239](https://github.com/realm/realm-js/issues/6239), since v12.0.0)
* When setting an embedded object in a `Realm.List` by index, the new object would be inserted at the end rather than replacing the existing object at the given index. ([#6239](https://github.com/realm/realm-js/issues/6239), since v12.0.0)
* When `SyncConfiguration.clientReset` was `undefined`, no client reset mode was set which could lead to an app crash with the message `m_mode != ClientResyncMode::Manual`. The default mode is now `RecoverUnsyncedChanges` and no callbacks are defined. ([#6260](https://github.com/realm/realm-js/issues/6260), since v12.0.0)

### Compatibility
* React Native >= v0.71.4
Expand Down
2 changes: 1 addition & 1 deletion packages/realm/src/app-services/SyncConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ function toSSLVerifyCallbackWithListArguments(verifyCallback: SSLVerifyCallback)
function parseClientResetConfig(clientReset: ClientResetConfig | undefined, onError: ErrorCallback | undefined) {
if (!clientReset) {
return {
clientResyncMode: undefined,
clientResyncMode: binding.ClientResetMode.Recover,
notifyBeforeClientReset: undefined,
notifyAfterClientReset: undefined,
errorHandler: onError ? toBindingErrorHandler(onError) : undefined,
Expand Down

0 comments on commit de3062e

Please sign in to comment.