don't set version to 0 when not set

This commit is contained in:
Ari Lazier 2016-10-18 15:08:02 -07:00
parent e05ef29e4f
commit 18c419fb96

View File

@ -351,9 +351,6 @@ void RealmClass<T>::constructor(ContextType ctx, ObjectType this_object, size_t
if (!Value::is_undefined(ctx, version_value)) { if (!Value::is_undefined(ctx, version_value)) {
config.schema_version = Value::validated_to_number(ctx, version_value, "schemaVersion"); config.schema_version = Value::validated_to_number(ctx, version_value, "schemaVersion");
} }
else {
config.schema_version = 0;
}
static const String migration_string = "migration"; static const String migration_string = "migration";
ValueType migration_value = Object::get_property(ctx, object, migration_string); ValueType migration_value = Object::get_property(ctx, object, migration_string);