From cf8e6efb16bb6995c38282715f6f4dc0a9801dc9 Mon Sep 17 00:00:00 2001 From: blagoev Date: Wed, 17 May 2017 15:16:00 +0300 Subject: [PATCH] fix build for no sync on windows --- src/js_realm.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js_realm.hpp b/src/js_realm.hpp index 01d7899a..16769b7f 100644 --- a/src/js_realm.hpp +++ b/src/js_realm.hpp @@ -541,6 +541,7 @@ void RealmClass::get_sync_session(ContextType ctx, ObjectType object, ReturnV } } +#endif template void RealmClass::wait_for_download_completion(ContextType ctx, FunctionType, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &return_value) { @@ -548,6 +549,7 @@ void RealmClass::wait_for_download_completion(ContextType ctx, FunctionType, auto config_object = Value::validated_to_object(ctx, arguments[0]); auto callback_function = Value::validated_to_function(ctx, arguments[1]); +#if REALM_ENABLE_SYNC ValueType sync_config_value = Object::get_property(ctx, config_object, "sync"); if (!Value::is_undefined(ctx, sync_config_value)) { realm::Realm::Config config; @@ -607,14 +609,13 @@ void RealmClass::wait_for_download_completion(ContextType ctx, FunctionType, return; } } +#endif ValueType callback_arguments[1]; callback_arguments[0] = Value::from_null(ctx); Function::call(ctx, callback_function, this_object, 1, callback_arguments); } -#endif - template void RealmClass::objects(ContextType ctx, FunctionType, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &return_value) { validate_argument_count(argc, 1);