mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-17 09:06:26 +00:00
default the schema version to 0 when a schema is provided
This commit is contained in:
parent
18c419fb96
commit
5e1ecdf19e
@ -351,6 +351,9 @@ void RealmClass<T>::constructor(ContextType ctx, ObjectType this_object, size_t
|
||||
if (!Value::is_undefined(ctx, version_value)) {
|
||||
config.schema_version = Value::validated_to_number(ctx, version_value, "schemaVersion");
|
||||
}
|
||||
else if (schema_updated) {
|
||||
config.schema_version = 0;
|
||||
}
|
||||
|
||||
static const String migration_string = "migration";
|
||||
ValueType migration_value = Object::get_property(ctx, object, migration_string);
|
||||
|
Loading…
x
Reference in New Issue
Block a user