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

Unexpected behavior when calling results.subscribe(undefined)

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None

      The docs for `results.subscribe(options)` indicate, that options is optional and can be provided or not provided. It is surprising then that providing undefined as an argument to subscribe results in the exception JS value must be of type 'object', got (undefined). Since this method is implemented in C++, it seems like it is too strict in checking the argument type and doesn't fallback to the no-argument case, like one would expect from a regular js function. Namely, I expect results.subscribe() to be equivalent to results.subscribe(undefined).

            Assignee:
            Unassigned Unassigned
            Reporter:
            nikola.irinchev@mongodb.com Nikola Irinchev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: