mg-library 1.0.781 → 1.0.782

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/login.js +11 -1
  2. package/package.json +1 -1
package/login.js CHANGED
@@ -113,7 +113,7 @@ export function onAutoLogin(dispatch, actions, app, apiUrl, language, setAppStat
113
113
 
114
114
  export function onAutoLoginWithAuthInfo(dispatch, actions, app, apiUrl, authInfo, language, setAppState, setNavigator) {
115
115
  setAppState({ isLoading: true });
116
- if (authInfo.userName != undefined && authInfo.password != undefined) {
116
+ if (existsAuthInfoInStorage(authInfo)) {
117
117
 
118
118
  console.log('con username y password');
119
119
 
@@ -199,3 +199,13 @@ export async function loadAuthInfoFromStorage() {
199
199
  ];
200
200
  }
201
201
  }
202
+
203
+ function existsAuthInfoInStorage(authInfo) {
204
+ try {
205
+ if (authInfo.server != null && authInfo.userName != null && authInfo.password != null)
206
+ if (authInfo.server != undefined && authInfo.userName != undefined && authInfo.password != undefined)
207
+ return true;
208
+ } catch (e) {
209
+ }
210
+ return false;
211
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mg-library",
3
- "version": "1.0.781",
3
+ "version": "1.0.782",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "react-native": "index.js",