diff --git a/README.md b/README.md index aa429cc..c7451fd 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ # react-native-meteor -Meteor-like methods for React Native. **Currently in v1.0.0-beta18** ! For old docs, see [v0.6.2 documentation](https://github.com/inProgress-team/react-native-meteor/tree/0.6.2) (classic ddp interface). +Meteor-like methods for React Native. **Currently in v1.0.0-beta19** ! For old docs, see [v0.6.2 documentation](https://github.com/inProgress-team/react-native-meteor/tree/0.6.2) (classic ddp interface). ## What is it for ? diff --git a/package.json b/package.json index d57157d..371cd57 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-meteor", - "version": "1.0.0-beta18", + "version": "1.0.0-beta19", "description": "DDP React-native Client", "main": "src/Meteor.js", "scripts": { diff --git a/src/Meteor.js b/src/Meteor.js index 64e9e4e..33ad56e 100644 --- a/src/Meteor.js +++ b/src/Meteor.js @@ -66,6 +66,9 @@ module.exports = { }, connect(endpoint, options) { + if(!endpoint) endpoint = Data._endpoint; + if(!options) options = Data._options; + Data._endpoint = endpoint; Data._options = options; diff --git a/src/user/User.js b/src/user/User.js index 22d12c9..4aecb10 100644 --- a/src/user/User.js +++ b/src/user/User.js @@ -22,6 +22,9 @@ module.exports = { AsyncStorage.removeItem(TOKEN_KEY); this._tokenIdSaved = null; this._userIdSaved = null; + + this.connect(); + typeof callback == 'function' && callback(err); }); },