Skip to content

Commit 91b658c

Browse files
Vladimir Upirovvengrov
authored andcommitted
fixed isValidLogin when Backendless.Async (#22)
* fixed a problem when we pass Backendless.Async into isValidLogin method of UserService
1 parent 7a015e8 commit 91b658c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

libs/backendless.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1923,7 +1923,14 @@
19231923
} else {
19241924
var user = Backendless.UserService.getCurrentUser();
19251925

1926-
return !!user;
1926+
if (async) {
1927+
//if async need to put it to the end of the stack
1928+
setTimeout(function() {
1929+
responder.success(!!user);
1930+
}, 0);
1931+
} else {
1932+
return !!user;
1933+
}
19271934
}
19281935
}
19291936
};

0 commit comments

Comments
 (0)