mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-18 17:47:32 +00:00
pr feedback
This commit is contained in:
parent
baac975413
commit
af9b54074e
@ -291,7 +291,7 @@ void Realm<T>::constructor(ContextType ctx, ObjectType this_object, size_t argc,
|
|||||||
|
|
||||||
ValueType migration_value = Object::get_property(ctx, object, migration_string);
|
ValueType migration_value = Object::get_property(ctx, object, migration_string);
|
||||||
if (!Value::is_undefined(ctx, migration_value)) {
|
if (!Value::is_undefined(ctx, migration_value)) {
|
||||||
FunctionType migration_function = Value::validated_to_function(ctx, migration_value);
|
FunctionType migration_function = Value::validated_to_function(ctx, migration_value, "migration");
|
||||||
config.migration_function = [=](SharedRealm old_realm, SharedRealm realm) {
|
config.migration_function = [=](SharedRealm old_realm, SharedRealm realm) {
|
||||||
ValueType arguments[2] = {
|
ValueType arguments[2] = {
|
||||||
create_object<T, RealmClass<T>>(ctx, new SharedRealm(old_realm)),
|
create_object<T, RealmClass<T>>(ctx, new SharedRealm(old_realm)),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user