mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-17 09:06:26 +00:00
Expose option to force the sync history type when opening a realm (#966)
This commit is contained in:
parent
2ca08161f8
commit
8b652b4e8a
@ -399,7 +399,9 @@ template<typename T>
|
||||
void SyncClass<T>::populate_sync_config(ContextType ctx, ObjectType realm_constructor, ObjectType config_object, Realm::Config& config)
|
||||
{
|
||||
ValueType sync_config_value = Object::get_property(ctx, config_object, "sync");
|
||||
if (!Value::is_undefined(ctx, sync_config_value)) {
|
||||
if (Value::is_boolean(ctx, sync_config_value)) {
|
||||
config.force_sync_history = Value::to_boolean(ctx, sync_config_value);
|
||||
} else if (!Value::is_undefined(ctx, sync_config_value)) {
|
||||
auto sync_config_object = Value::validated_to_object(ctx, sync_config_value);
|
||||
|
||||
ObjectType sync_constructor = Object::validated_get_object(ctx, realm_constructor, std::string("Sync"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user