From 290485134ef2fd3bf925dd4c89ecf2f578aff301 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Mon, 18 Jun 2018 10:03:40 -0700 Subject: [PATCH] Add undocumented _automaticChangeNotifications config option --- src/js_realm.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/js_realm.hpp b/src/js_realm.hpp index 2a11d51d..33fde2b9 100644 --- a/src/js_realm.hpp +++ b/src/js_realm.hpp @@ -568,6 +568,12 @@ void RealmClass::constructor(ContextType ctx, ObjectType this_object, size_t config.cache = Value::validated_to_boolean(ctx, cache_value, "_cache"); } + static const String automatic_change_notifications_string = "_automaticChangeNotifications"; + ValueType automatic_change_notifications_value = Object::get_property(ctx, object, automatic_change_notifications_string); + if (!Value::is_undefined(ctx, automatic_change_notifications_value)) { + config.automatic_change_notifications = Value::validated_to_boolean(ctx, automatic_change_notifications_value, "_automaticChangeNotifications"); + } + static const String disable_format_upgrade_string = "disableFormatUpgrade"; ValueType disable_format_upgrade_value = Object::get_property(ctx, object, disable_format_upgrade_string); if (!Value::is_undefined(ctx, disable_format_upgrade_value)) {