diff --git a/CHANGELOG.md b/CHANGELOG.md index ec67c58c8e0..612392453b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,8 +33,7 @@ realm.write(() => { ``` ### Fixed -* ([#????](https://github.com/realm/realm-js/issues/????), since v?.?.?) -* None. +* Fixed build error (call to implicitly-deleted copy constructor of 'realm::js::RealmClass::Arguments') (follow up to [#4568](https://github.com/realm/realm-js/pull/4568)) ### Compatibility * Atlas App Services. diff --git a/src/js_realm.hpp b/src/js_realm.hpp index 50eef3ea26f..dae7b510672 100644 --- a/src/js_realm.hpp +++ b/src/js_realm.hpp @@ -1165,10 +1165,10 @@ void RealmClass::async_open_realm(ContextType ctx, ObjectType this_object, Ar Function::callback(protected_ctx, protected_callback, protected_this, 1, callback_arguments); } - std::shared_ptr task; - task = Realm::get_synchronized_realm(config); + std::shared_ptr task = Realm::get_synchronized_realm(config); - realm::util::EventLoopDispatcher callback_handler([=, defaults = std::move(defaults), + realm::util::EventLoopDispatcher callback_handler([=, args_count = args.count, + defaults = std::move(defaults), constructors = std::move(constructors)]( ThreadSafeReference&& realm_ref, std::exception_ptr error) { @@ -1200,7 +1200,7 @@ void RealmClass::async_open_realm(ContextType ctx, ObjectType this_object, Ar try { ValueType unprotected_args = protected_args; - handle_initial_subscriptions(protected_ctx, args.count - 1, &unprotected_args, realm, realm_exists); + handle_initial_subscriptions(protected_ctx, args_count - 1, &unprotected_args, realm, realm_exists); } catch (TypeErrorException e) { auto error = make_js_error(ctx, e.what());