Skip to content

Commit a4888ed

Browse files
committed
Merge pull request #92 from frantic/facebook-utils-react-native
Make FacebookUtils work with React Native
2 parents 9fbceee + 0079766 commit a4888ed

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/ParseUser.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -694,10 +694,11 @@ export default class ParseUser extends ParseObject {
694694
static _registerAuthenticationProvider(provider) {
695695
authProviders[provider.getAuthType()] = provider;
696696
// Synchronize the current user with the auth provider.
697-
var current = ParseUser.current();
698-
if (current) {
699-
current._synchronizeAuthData(provider.getAuthType());
700-
}
697+
ParseUser.currentAsync().then((current) => {
698+
if (current) {
699+
current._synchronizeAuthData(provider.getAuthType());
700+
}
701+
});
701702
}
702703

703704
static _logInWith(provider, options) {

0 commit comments

Comments
 (0)