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

Bug | args.map is not a function

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: None

      Hey,
      Realm version: v10.0.0-beta9

      Seems like there is a serious bug around the lib/browser/rpc.js file, many of the auth methods are expecting an args array param, while they are receiving scalar values, which cause an args.map is not a function error.
      For example (lib/browser/rpc.js line 103:

      export function _emailPasswordRPC (args) {
        args = args.map(arg => serialize(null, arg))
        const result = sendRequest('_emailPassword', { arguments: args })
        return deserialize(undefined, result)
      }
      

      Calling function is lib/browser/credentials.js line 37:

      static emailPassword(email, password) {
        return _emailPasswordRPC(email, password);
      }
      

      so rpc function should either be updated to ...args or calling function should pass an array.

            Assignee:
            lubo.blagoev@mongodb.com Lubo Blagoev
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: