Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-1766

Throw an error if you try to call `realm.subscriptions.update` inside an `initialSubscriptions` `update` call

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None

      Right now calling realm.subscriptions.update inside an initialSubscriptions update callback results in a cryptic error, because the code is already running inside a subscription update transaction. Users should use the first subs argument passed to the update callback instead to directly mutate the subscription set.

      This is documented but it could be confusing, so it may be worth throwing a clearer error if we can detect that a user is doing this.

            Assignee:
            Unassigned Unassigned
            Reporter:
            tom.duncalf@mongodb.com Tom Duncalf (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: