From c6753efe5ab9a053b1acce9c3ccf9ea82fabd8fc Mon Sep 17 00:00:00 2001 From: Kenneth Geisshirt Date: Tue, 4 Sep 2018 10:58:03 +0200 Subject: [PATCH] Added to the support library for React Native debugging (#479) (#2005) --- CHANGELOG.md | 1 + lib/browser/subscription.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 856afd89..e9ab3dd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ Server and open synchronized Realms (#1276). ### Bug fixes * Removed a false negative warning when using `User.createConfiguration`. * Fixed the type definition for `User.authenticate`. +* Added `Realm.Sync.Subscription.removeAllListeners()` to the `Subscription` proxy class used when debugging a React Native app (#479). * Fixed the type definitions for `Session.addConnectionNotification` and `Session.removeConnectionNotification` ### Internal diff --git a/lib/browser/subscription.js b/lib/browser/subscription.js index da5ee98c..bfc70508 100644 --- a/lib/browser/subscription.js +++ b/lib/browser/subscription.js @@ -34,12 +34,13 @@ Object.defineProperties(Subscription.prototype, { createMethods(Subscription.prototype, objectTypes.SUBSCRIPTION, [ 'unsubscribe', 'addListener', - 'removeListener' + 'removeListener', + 'removeAllListeners' ]); export function createSubscription(realmId, info) { let subscription = Object.create(Subscription.prototype); - + subscription[keys.realm] = "(Subscription object)"; subscription[keys.id] = info.id; subscription[keys.type] = objectTypes.SUBSCRIPTION;