_wrapAsync in javascript SDK


There seems to be a bug in the javascript SDK. There is

    UserService.prototype = {
        _wrapAsync: function(async, stayLoggedIn) {
            var me   = this, success = function(data) {
                currentUser = me._parseResponse(tryParseJSON(data), stayLoggedIn);
            }, error = function(data) {

            return new Async(success, error);

which is used throughout the UserService module. It however contains behaviour to handle a login request (or a request returning a user object anyway).

In the get getUserRoles method for example, _wrapAsync should not be used. Not sure about other places, but I had to disable it at that place because I requested the user roles after login, and the wrapper code messed up the stayLoggedIn functionality.

Kind regards,

Hello, Jeroen!
Thank you for reporting it, it looks that you’re right. I’ve created an internal ticket for this topic and we shall work on it. Ticket ID is BKNDLSS-13006.
Best regards,

was this fixed?