diff --git a/src/js_realm.hpp b/src/js_realm.hpp index 3de0d84c..e94e42be 100644 --- a/src/js_realm.hpp +++ b/src/js_realm.hpp @@ -432,16 +432,6 @@ void RealmClass::constructor(ContextType ctx, ObjectType this_object, size_t config.schema_mode = SchemaMode::ResetFile; } - static const String delete_realm_if_migration_needed_string = "deleteRealmIfMigrationNeeded"; - ValueType delete_realm_if_migration_needed_value = Object::get_property(ctx, object, delete_realm_if_migration_needed_string); - if (!Value::is_undefined(ctx, delete_realm_if_migration_needed_value) && Value::validated_to_boolean(ctx, delete_realm_if_migration_needed_value, "deleteRealmIfMigrationNeeded")) { - if (config.schema_mode == SchemaMode::ReadOnly) { - throw std::invalid_argument("Cannot set 'deleteRealmIfMigrationNeeded' when 'readOnly' is set."); - } - - config.schema_mode = SchemaMode::ResetFile; - } - static const String schema_string = "schema"; ValueType schema_value = Object::get_property(ctx, object, schema_string); if (!Value::is_undefined(ctx, schema_value)) {